You use the advanced OAuth 2.0 settings to define how an access token should be handled.
There are three settings: one of them relates to sending requests, the others relate to refreshing the access token.
Send Access Token As
The Send Access Token option defines where the access token is sent.
Option | Description | Example |
---|---|---|
Header |
The access token is sent as the request header. |
Authorization: Bearer rRR0GnTudjuUUGaSt0n |
Query |
The access token is sent as a query parameter. |
https://www.example.com/a/v1/y/{userId}?access_token=rRR0GnTudjuUUGaSt0n |
Refresh Access Token
The Refresh Access Token option configures whether ReadyAPI updates the expired access token automatically or not.
Tip: | Use the Access Token Expiration Time option to configure when ReadyAPI should mark an access token as expired. |
Option | Description | ||
---|---|---|---|
Automatic |
(Default) ReadyAPI updates the access token automatically. |
||
Manual |
You need to update an access token manually.
|
Access Token Expiration Time
The Access Token Expiration Time option defines the expiration time for the access token. You can use the expiration time provided by the server, or you can specify the time you need manually.
Note: | The 0 value indicates that the token will never expire. There is no setting for immediate expiration of the token. |
Option | Description |
---|---|
Server |
ReadyAPI uses time provided by the authorization server. |
Custom |
ReadyAPI marks the token as expired after the specified number of seconds, minutes, or hours elapses. |
See Also
Automation Script
OAuth 2.0 Grant Types
OpenID Connect
OAuth 2.0 Basics
OAuth 2.0 and OAuth 2.0 (Azure)