OAuth Token Grants
In the previous blog post, I explained what’s OAuth and how it can be used when developing applications. And also I explained the four roles and the tasks of each role when it comes to retrieving protected resources. Also in the previous blog post I simply describe about the main four grant types that a client can use to retrieve an access-token. So in this blog post, I’m planning to go in detail with these grant types. Authorization code grant type The authorization code grant type is used to obtain both access tokens and refresh tokens, and this type is optimized for confidential client. Refresh token are credentials to get an access-token, or in simple form, refresh token are used to get a new token when the current token was expired or invalid. In authorization code grant type, first the client initiates the flow by directing the resource owner’s user-agent (the web browser) to the authorization endpoint at the authorization server using HTTP GET req