|
Wt
3.3.0
|
An OAuth access token. More...
#include <Wt/Auth/OAuthService>
Public Member Functions | |
| OAuthAccessToken () | |
| Default constructor. | |
| OAuthAccessToken (const std::string &value, const WDateTime &expires, const std::string &refreshToken) | |
| Constructor. | |
| bool | isValid () const |
| Returns whether the token is valid. | |
| const std::string & | value () const |
| Returns the access token value. | |
| WDateTime | expires () const |
| Returns the token expires time (if available). | |
| const std::string & | refreshToken () const |
| Returns the refresh token (if available). | |
Static Public Attributes | |
| static const OAuthAccessToken | Invalid |
| An invalid token constant. | |
An OAuth access token.
A access token is the result of an authorization process, and encapsulates the authorization to access protected information.
Next to its value(), it also contains optionally an expires date and a refresh token.
| Wt::Auth::OAuthAccessToken::OAuthAccessToken | ( | ) |
Default constructor.
Creates an invalid access token.
| WDateTime Wt::Auth::OAuthAccessToken::expires | ( | ) | const |
Returns the token expires time (if available).
Returns a Null date-time if not available.
| bool Wt::Auth::OAuthAccessToken::isValid | ( | ) | const |
Returns whether the token is valid.
An invalid access token is used to signal for example that the user denied the authorization request.
| const std::string& Wt::Auth::OAuthAccessToken::refreshToken | ( | ) | const |
Returns the refresh token (if available).
The refresh token is an optional token that can be used when the access token has expired.
If not available, returns an empty string.
| const std::string& Wt::Auth::OAuthAccessToken::value | ( | ) | const |
Returns the access token value.
This value can be used to access protected resources.
const OAuthAccessToken Wt::Auth::OAuthAccessToken::Invalid [static] |
An invalid token constant.
This is a token that is not isValid().
1.7.5.1