The implicit grant type does not require client authentication, and relies on the presence of the resource owner and the registration of the redirection URI. The resource owner needs to authenticate with the authorization server to obtain the access token. Because the access token is encoded into the redirection URI, it may be exposed to the resource owner and other applications residing in the same device.
The diagram below depicts the flow of Implicit Grant.
The client requests for the access token with the client ID and grant type with optional parameters.
Since the resource owner authenticates directly with the authorization server, his/her credentials will not be shared with the client.
The Authorization Server sends the Access token in URI fragment to the client.
Client extract the token from the fragment and send the API request to the Resource Server with the access token.
With this grant, the refresh token will not be issued for the client as the client type is public. Also note that, the implicit grant does not include client authentication because it does not make use of client secret.
Invoking the Token API to generate tokens
In his example we are using WSO2 Playground hosted as a web application to obtain the access token with implicit grant.
- Setup WSO2 Playground sample webapp in a Application server. You can use WSO2 Identity Server and setup the application following Setting Up the Sample Webapp.
- Login to WSO2 API Manager store and create an application as below.