OAuth 2.0 token and associated information.
More...
#include <oauth2.h>
|
enum | { undefined_expiration = -1
} |
| Value for undefined expiration time in expires_in(). More...
|
|
OAuth 2.0 token and associated information.
const utility::string_t& web::http::oauth2::experimental::oauth2_token::access_token |
( |
| ) |
const |
|
inline |
Get access token.
- Returns
- Access token string.
int64_t web::http::oauth2::experimental::oauth2_token::expires_in |
( |
| ) |
const |
|
inline |
Get the lifetime of the access token in seconds. For example, 3600 means the access token will expire in one hour from the time when access token response was generated by the authorization server. Value of undefined_expiration means expiration time is either unset or that it was not returned by the server with the access token.
- Returns
- Lifetime of the access token in seconds or undefined_expiration if not set.
bool web::http::oauth2::experimental::oauth2_token::is_valid_access_token |
( |
| ) |
const |
|
inline |
Get access token validity state. If true, access token is a valid.
- Returns
- Access token validity state.
const utility::string_t& web::http::oauth2::experimental::oauth2_token::refresh_token |
( |
| ) |
const |
|
inline |
Get refresh token.
- Returns
- Refresh token string.
const utility::string_t& web::http::oauth2::experimental::oauth2_token::scope |
( |
| ) |
const |
|
inline |
Get token scope.
- Returns
- Token scope string.
void web::http::oauth2::experimental::oauth2_token::set_access_token |
( |
utility::string_t |
access_token | ) |
|
|
inline |
Set access token.
- Parameters
-
access_token | Access token string to set. |
void web::http::oauth2::experimental::oauth2_token::set_expires_in |
( |
int64_t |
expires_in | ) |
|
|
inline |
Set lifetime of access token (in seconds).
- Parameters
-
expires_in | Lifetime of access token in seconds. |
void web::http::oauth2::experimental::oauth2_token::set_refresh_token |
( |
utility::string_t |
refresh_token | ) |
|
|
inline |
Set refresh token.
- Parameters
-
refresh_token | Refresh token string to set. |
void web::http::oauth2::experimental::oauth2_token::set_scope |
( |
utility::string_t |
scope | ) |
|
|
inline |
Set token scope.
- Parameters
-
scope | Token scope string to set. |
void web::http::oauth2::experimental::oauth2_token::set_token_type |
( |
utility::string_t |
token_type | ) |
|
|
inline |
Set token type.
- Parameters
-
token_type | Token type string to set. |
const utility::string_t& web::http::oauth2::experimental::oauth2_token::token_type |
( |
| ) |
const |
|
inline |
Get token type.
- Returns
- Token type string.
The documentation for this class was generated from the following file: