Getting Token from UAA

Now that we have created a Client as well as user. Its time for the client to get the token for a logged in user.

Remember we are still using implicit Grant flow.


Testing The flow

  1. Go to https://<UAA_INSTANCE_ID><CLIENT_ID> and give the test user credentials that were created before.

For example: Check the screenshot.

Any request to UAA Server /oauth/authorize endpoint resulted in a 302 Status Code with the location Header set to with the parameters access_token , token_type , expires_in,scope & jti

PS : I already had a session with UAA. Hence got redirect in singleshot

  • We Just asked UAA instance to give us a token (check the request paramter response_type)
  • We Provided the client_id as well
  • Since we had given the callback URL before while creating the client, The browser gets a redirect to the callback URL with a token
Additional Configuration done on the client side.
  1. Enabled HTML5 Mode in nginx. Click here for Code Change.
    1. This way when the UAA redirects to /callback, index.html page is returned and the we don't get a 404 Error page