Learning about OAuth2 Server.
OAuth2.0. is the authorization protocol used for authorization not authentication. Case: User wants to access some resources (Client to server communication) - Step 1: hit url abc.xyz.com (this url is protected and any resources in it requires auth) - Step 2 (Authentication part done by spring security not oauth2): URL triggers login page to first validate who the user is. - Step 3: User authenticates and return the access code to the client (which is requesting resource). - Step 4: Now client have the access code, client will hit authorization server with the access code, and authorization server return access token. - Step 5: Now client have the access token, it takes the token to the resource server to get the resource. WHY NEED ACCESS CODE AND WHY NOT DIRECTLY ACCESS TOKEN??? - As the user is anom