Securing an access token with authorization code (with PKCE) grant type
About this task
This section explains how to secure the get access token calls using postman.
Procedure
- In the Postman, under the Authorization tab, select the authorization type as OAuth2.0 from the TYPE menu. Provide the following information.
- Provide the following information.
- In the Configure New Token section, select the grant type as Authorization Code (With PKCE).
- Type the redirect URL as https://oauth.pstmn.io/v1/callback in the Callback URL text box.
- Select the Authorize using browser check box.
- Type the authorization URL as http(s)://hostname/invoke/pub.apigateway.oauth2/authorize in the Auth URL text box.
- Type the http://hostname/invoke/pub.apigateway.oauth2/getAccessToken in the Access Token URL text box.
- Type the client ID and client secret in the Client ID and
Client Secret text boxes respectively.Note: You can get the client ID and client secret from the Authentication tab of the Application screen.
- From Code Challenge Method list, select the hasting method used to generate the code challenge.
- Specify the OAuth scope that you have created for the local authorization server in Step 1 in the Scope text box.
- Select the client authentication as Send client credentials in body.
- Click Get New Access Token.
- Click Approve. The MANAGE ACCESS TOKENS pop-up window displays the access token.