10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::oidc::OIDCState Class Reference

#include <OIDCState.h>

Detailed Description

Container of OIDC state, describing the user session.

This container does not have any logic.

Inheritance diagram for tenduke::oidc::OIDCState:
tenduke::oauth::OAuthStateImpl tenduke::oauth::OAuthState

Public Member Functions

 OIDCState (const tenduke::oauth::OAuthState &oauthState, tenduke::oidc::IdToken idToken)
 Constructs new instance.
 
 OIDCState (const std::string &accessToken, const std::string &refreshToken, const std::int64_t expiresAt, bool infinite, std::map< std::string, std::string > additionalProperties, tenduke::oidc::IdToken idToken)
 Constructs new instance.
 
const tenduke::oidc::IdTokengetIdToken () const
 Returns the contained ID-token.
 
- Public Member Functions inherited from tenduke::oauth::OAuthStateImpl
 OAuthStateImpl (std::string accessToken, std::string refreshToken, int64_t expiresAt, bool infinite, std::map< std::string, std::string > additionalProperties)
 Constructs new instance.
 
 OAuthStateImpl (std::string accessToken, std::string refreshToken, int64_t expiresAt, std::map< std::string, std::string > additionalProperties)
 Constructs new instance.
 
const std::string & getAccessToken () const override
 Returns the access token.
 
const std::string & getRefreshToken () const override
 Returns the refresh token.
 
std::int64_t getExpiresAt () const override
 Returns timestamp (as epoch seconds) when the current access token expires.
 
const std::map< std::string, std::string > & getAdditionalProperties () const override
 Returns all additional properties returned by the server.
 
const std::string * getAdditionalProperty (const std::string &name) const override
 Returns additional property returned by the server.
 
bool hasAdditionalProperty (const std::string &name) const override
 Checks if the state has additional property.
 
bool hasAccessToken () const override
 Returns true if the state contains an access token.
 
bool doesExpire () const override
 Returns true if the access token expires.
 
bool isRefreshable () const override
 Returns true if the state is refreshable (i.e.
 
void setAccessToken (const std::string &newAccessToken) override
 Set the access token.
 
void setExpiresAt (std::int64_t newExpiresAt) override
 Set the "expires at".
 
void setRefreshToken (const std::string &newRefreshToken) override
 Set the refresh token.
 
void refreshFrom (const OAuthState &state) override
 Refreshes the state from another state, This is called after refreshing the state with the service.
 
void removeAdditionalProperty (const std::string &propertyName) override
 Removes given additional property.
 

Constructor & Destructor Documentation

◆ OIDCState() [1/2]

tenduke::oidc::OIDCState::OIDCState ( const tenduke::oauth::OAuthState oauthState,
tenduke::oidc::IdToken  idToken 
)
inline

Constructs new instance.

Parameters
oauthState-
idToken-

◆ OIDCState() [2/2]

tenduke::oidc::OIDCState::OIDCState ( const std::string &  accessToken,
const std::string &  refreshToken,
const std::int64_t  expiresAt,
bool  infinite,
std::map< std::string, std::string >  additionalProperties,
tenduke::oidc::IdToken  idToken 
)
inline

Constructs new instance.

Parameters
accessToken-
refreshToken-
expiresAt-
infinite-
additionalProperties-
idToken-

The documentation for this class was generated from the following file: