This page is under construction
This section guides you through consuming an OpenID connect implicit client profile that is based on implicit flow.
Following are the steps involved according to the OpenID specification.
- Client prepares an Authentication Request containing the desired request parameters.
- Client sends the request to the Authorization Server.
- Authorization Server Authenticates the End-User.
- Authorization Server obtains End-User Consent/Authorization.
- Authorization Server sends the End-User back to the Client with an ID Token and, if requested, an Access Token.
- Client validates the ID token and retrieves the End-User's Subject Identifier.
To execute the above flow, it is mandatory for the authorization request to include the following parameters:
- scope - this should be 'openid'
client_id - OAuth 2.0 Client Identifier valid at the Authorization Server
- response_type - for this flow the value should be sent as 'id_token token' or 'id_token'
id_token token - ID token is issued together with the access token
id_token - No Access Token is returned, just the id token
- redirect_uri/callback_uri - the URI where the authorization server should send the response
- nonce - associates a Client session with an ID Token to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token.
(The bold parameters have differences between the usage in implicit vs authorization code flow)
Rest of this page addresses how this flow can be tried out with WSO2 Identity Server.
Following are the expected requests and the relevant responses WSO2 Identity Server would generate for this flow.
Response_type=id_token
Request
Response
Please refer https://wso2.org/jira/browse/IDENTITY-4247 for a known issue in the above flow and the fix.
Please note nonce value is mandatory parameter here and if didn’t provide scope=openid you won’t get Id Token.
Base64 decoded value of Id Token
{"auth_time":1453184484,"exp":1453188084,"sub":"admin@carbon.super","azp":"W2OoSxQDCVrBk1lnffo1NGCKZbQa","at_hash":"DoxjyXzmrL6Z_kWRzmBdCA","nonce":"abc","aud":["W2OoSxQDCVrBk1lnffo1NGCKZbQa"],"iss":"https:\/\/localhost:9443\/oauth2\/token","iat":1453184484}
Id Token does not contain at_hash value since no access token is generated (access token is required to calculate at_hash value)
Response_type : id_token token
Request
Response
Here, note that both the access token and IDToken are returned to the client.