Sunday 13 September 2020

OAuth2.0 Tutorial - PART - 7

 

Executing the Application and Look for the results


http://localhost:9595/oauth/token

Step 1:- In Authorisation, First set type = Basic Auth, then in username and password -> pass the client_id and client_secret.



Step -2, Set the POST parameters in Body like below and hit the send button will receive the response like below.



Note : The grant_type Password is used by first-party clients to exchange a user's credentials for an access token.


Step-3

Use the access token to get the list of employees which is available in the Database.

URL - http://localhost:9595/emps/employee?access_token=66331215-ab80-4241-acd6-e48971f73b6c



Step-4

Use the refresh token to get the new access token like below, pass the refresh_token and corresponding values received from step 1.

URL - http://localhost:9595/oauth/token




No comments:

Post a Comment