#include <OAuthState.h>
|
virtual const std::string & | getAccessToken () const=0 |
| Returns the access token.
|
|
virtual const std::string & | getRefreshToken () const=0 |
| Returns the refresh token.
|
|
virtual std::int64_t | getExpiresAt () const=0 |
| Returns timestamp (as epoch seconds) when the current access token expires.
|
|
virtual const std::map< std::string, std::string > & | getAdditionalProperties () const=0 |
| Returns all additional properties returned by the server.
|
|
virtual const std::string * | getAdditionalProperty (const std::string &name) const=0 |
| Returns additional property returned by the server.
|
|
virtual bool | hasAdditionalProperty (const std::string &name) const=0 |
| Checks if the state has additional property.
|
|
virtual void | removeAdditionalProperty (const std::string &propertyName)=0 |
| Removes given additional property.
|
|
virtual bool | hasAccessToken () const=0 |
| Returns true if the state contains an access token.
|
|
virtual bool | doesExpire () const=0 |
| Returns true if the access token expires.
|
|
virtual bool | isRefreshable () const=0 |
| Returns true if the state is refreshable (i.e.
|
|
virtual void | setAccessToken (const std::string &newAccessToken)=0 |
| Set the access token.
|
|
virtual void | setExpiresAt (std::int64_t newExpiresAt)=0 |
| Set the "expires at".
|
|
virtual void | setRefreshToken (const std::string &newRefreshToken)=0 |
| Set the refresh token.
|
|
virtual void | refreshFrom (const OAuthState &state)=0 |
| Refreshes the state from another state, This is called after refreshing the state with the service.
|
|
◆ doesExpire()
virtual bool tenduke::oauth::OAuthState::doesExpire |
( |
| ) |
const |
|
pure virtual |
Returns true
if the access token expires.
Returns false
if the access token does not expire.
- Returns
- -
◆ getAdditionalProperties()
virtual const std::map< std::string, std::string > & tenduke::oauth::OAuthState::getAdditionalProperties |
( |
| ) |
const |
|
pure virtual |
Returns all additional properties returned by the server.
- Returns
- -
◆ getAdditionalProperty()
virtual const std::string * tenduke::oauth::OAuthState::getAdditionalProperty |
( |
const std::string & | name | ) |
const |
|
pure virtual |
Returns additional property returned by the server.
- Parameters
-
- Returns
- property value or nullptr if no such property
◆ getExpiresAt()
virtual std::int64_t tenduke::oauth::OAuthState::getExpiresAt |
( |
| ) |
const |
|
pure virtual |
Returns timestamp (as epoch seconds) when the current access token expires.
- Returns
- expiration of current accesstime in epoch seconds. Returns tenduke::oauth::TOKEN_DOES_NOT_EXPIRE if server did not return "expires_at".
◆ getRefreshToken()
virtual const std::string & tenduke::oauth::OAuthState::getRefreshToken |
( |
| ) |
const |
|
pure virtual |
Returns the refresh token.
- Returns
- the refresh-token. Returns empty string if no refresh token.
◆ hasAccessToken()
virtual bool tenduke::oauth::OAuthState::hasAccessToken |
( |
| ) |
const |
|
pure virtual |
Returns true
if the state contains an access token.
(Uninitialized states do not contain access token).
- Returns
- -
◆ hasAdditionalProperty()
virtual bool tenduke::oauth::OAuthState::hasAdditionalProperty |
( |
const std::string & | name | ) |
const |
|
pure virtual |
Checks if the state has additional property.
- Parameters
-
- Returns
- -
◆ isRefreshable()
virtual bool tenduke::oauth::OAuthState::isRefreshable |
( |
| ) |
const |
|
pure virtual |
Returns true
if the state is refreshable (i.e.
it contains refresh-token).
- Returns
- -
◆ refreshFrom()
virtual void tenduke::oauth::OAuthState::refreshFrom |
( |
const OAuthState & | state | ) |
|
|
pure virtual |
Refreshes the state from another state, This is called after refreshing the state with the service.
- Parameters
-
◆ removeAdditionalProperty()
virtual void tenduke::oauth::OAuthState::removeAdditionalProperty |
( |
const std::string & | propertyName | ) |
|
|
pure virtual |
Removes given additional property.
- Parameters
-
◆ setAccessToken()
virtual void tenduke::oauth::OAuthState::setAccessToken |
( |
const std::string & | newAccessToken | ) |
|
|
pure virtual |
Set the access token.
- Parameters
-
◆ setExpiresAt()
virtual void tenduke::oauth::OAuthState::setExpiresAt |
( |
std::int64_t | newExpiresAt | ) |
|
|
pure virtual |
Set the "expires at".
- Parameters
-
◆ setRefreshToken()
virtual void tenduke::oauth::OAuthState::setRefreshToken |
( |
const std::string & | newRefreshToken | ) |
|
|
pure virtual |
Set the refresh token.
- Parameters
-
The documentation for this class was generated from the following file: