forked from LiveCarta/PayPal-PHP-Server-SDK
* Automated commit message * Automated commit message * Automated commit message * Automated commit message --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
36 lines
1.5 KiB
Markdown
36 lines
1.5 KiB
Markdown
|
|
# O Auth Token
|
|
|
|
OAuth 2 Authorization endpoint response
|
|
|
|
## Structure
|
|
|
|
`OAuthToken`
|
|
|
|
## Fields
|
|
|
|
| Name | Type | Tags | Description | Getter | Setter |
|
|
| --- | --- | --- | --- | --- | --- |
|
|
| `accessToken` | `string` | Required | Access token | getAccessToken(): string | setAccessToken(string accessToken): void |
|
|
| `tokenType` | `string` | Required | Type of access token | getTokenType(): string | setTokenType(string tokenType): void |
|
|
| `expiresIn` | `?int` | Optional | Time in seconds before the access token expires | getExpiresIn(): ?int | setExpiresIn(?int expiresIn): void |
|
|
| `scope` | `?string` | Optional | List of scopes granted<br>This is a space-delimited list of strings. | getScope(): ?string | setScope(?string scope): void |
|
|
| `expiry` | `?int` | Optional | Time of token expiry as unix timestamp (UTC) | getExpiry(): ?int | setExpiry(?int expiry): void |
|
|
| `refreshToken` | `?string` | Optional | Refresh token<br>Used to get a new access token when it expires. | getRefreshToken(): ?string | setRefreshToken(?string refreshToken): void |
|
|
| `idToken` | `?string` | Optional | An ID token response type is of JSON Web Token (JWT) that contains claims about the identity of the authenticated user. | getIdToken(): ?string | setIdToken(?string idToken): void |
|
|
|
|
## Example (as JSON)
|
|
|
|
```json
|
|
{
|
|
"access_token": "access_token4",
|
|
"token_type": "token_type6",
|
|
"expires_in": 74,
|
|
"scope": "scope6",
|
|
"expiry": 88,
|
|
"refresh_token": "refresh_token6",
|
|
"id_token": "id_token6"
|
|
}
|
|
```
|
|
|