1#ifndef TENDUKE_OAUTH_OAUTHSTATE_H
2#define TENDUKE_OAUTH_OAUTHSTATE_H
12const std::int64_t TOKEN_DOES_NOT_EXPIRE = INT64_MAX;
OAuth session state.
Definition OAuthState.h:17
virtual bool hasAccessToken() const =0
Returns true if the state contains an access token.
virtual void setRefreshToken(const std::string &newRefreshToken)=0
Set the refresh token.
virtual std::int64_t getExpiresAt() const =0
Returns timestamp (as epoch seconds) when the current access token expires.
virtual const std::string & getAccessToken() const =0
Returns the access token.
virtual bool isRefreshable() const =0
Returns true if the state is refreshable (i.e.
virtual const std::string & getRefreshToken() const =0
Returns the refresh token.
virtual const std::string * getAdditionalProperty(const std::string &name) const =0
Returns additional property returned by the server.
virtual void refreshFrom(const OAuthState &state)=0
Refreshes the state from another state, This is called after refreshing the state with the service.
virtual const std::map< std::string, std::string > & getAdditionalProperties() const =0
Returns all additional properties returned by the server.
virtual void setAccessToken(const std::string &newAccessToken)=0
Set the access token.
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 void setExpiresAt(std::int64_t newExpiresAt)=0
Set the "expires at".
virtual bool doesExpire() const =0
Returns true if the access token expires.
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7