10Duke Enterprise C++ Client
|
#include <OAuthState.h>
OAuth session state.
Public Member Functions | |
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. | |
|
pure virtual |
Returns true
if the access token expires.
Returns false
if the access token does not expire.
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Returns the access token.
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Returns all additional properties returned by the server.
Implemented in tenduke::oauth::OAuthStateImpl.
|
pure virtual |
Returns additional property returned by the server.
name | property name |
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Returns timestamp (as epoch seconds) when the current access token expires.
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Returns the refresh token.
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Returns true
if the state contains an access token.
(Uninitialized states do not contain access token).
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Checks if the state has additional property.
name | - |
Implemented in tenduke::oauth::OAuthStateImpl.
|
pure virtual |
Returns true
if the state is refreshable (i.e.
it contains refresh-token).
Implemented in tenduke::oauth::OAuthStateImpl, and tenduke::oauth::OAuthStateServiceImpl.
|
pure virtual |
Refreshes the state from another state, This is called after refreshing the state with the service.
state | - |
Implemented in tenduke::oauth::OAuthStateImpl.
|
pure virtual |
Removes given additional property.
propertyName | - |
Implemented in tenduke::oauth::OAuthStateImpl.
|
pure virtual |
|
pure virtual |
|
pure virtual |