|
10Duke Enterprise C++ SDK
|
#include <BaseOIDCRequest.h>
Base class for OIDC requests.
Public Member Functions | |
| BaseOIDCRequest (const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > &oidcConfiguration, std::string clientId, const std::shared_ptr< const tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< tenduke::time::Clock > &clock, std::string nonce) | |
| Constructs new instance. | |
Protected Member Functions | |
| virtual std::unique_ptr< tenduke::oidc::OIDCState > | toOIDCState (tenduke::oauth::OAuthState &oauthState) const |
| Creates OIDCState from OAuthState. | |
| virtual tenduke::oidc::IdToken | parseIdToken (const std::string &serializedIdToken, const std::string &expectedNonce) const |
| Parses id token. | |
| virtual void | validateAudience (const tenduke::oidc::IdToken &idToken) const |
| Validates ID-token "aud" and "azp" claims against the client id. | |
| virtual void | validateTimes (const tenduke::oidc::IdToken &idToken) const |
| Validates ID-token time claims "exp" (required), "nbf" and "iat" against current time, allowing clock skew of OIDCConfiguration::allowedClockSkewS. | |
Static Protected Member Functions | |
| static std::vector< std::string > | getAudiences (const tenduke::oidc::IdToken &idToken) |
| Returns the ID-token audiences: "aud" can be a single string or an array of strings. | |
Protected Attributes | |
| const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > | oidcConfiguration |
| OIDC-configuration. | |
| const std::string | clientId |
| OAuth client id of this client, expected in ID-token "aud" (and "azp") claim. | |
| const std::shared_ptr< const tenduke::jwt::JWTParser > | parseJWT |
| JWT parser. | |
| const std::shared_ptr< tenduke::time::Clock > | clock |
| Clock for validating ID-token time claims. | |
| tenduke::oidc::BaseOIDCRequest::BaseOIDCRequest | ( | const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > & | oidcConfiguration, |
| std::string | clientId, | ||
| const std::shared_ptr< const tenduke::jwt::JWTParser > & | jwtParser, | ||
| const std::shared_ptr< tenduke::time::Clock > & | clock, | ||
| std::string | nonce ) |
Constructs new instance.
| oidcConfiguration | - |
| clientId | OAuth client id of this client. The ID-token audience must contain it. |
| jwtParser | - |
| clock | clock for validating ID-token time claims |
| nonce | - |
|
staticprotected |
Returns the ID-token audiences: "aud" can be a single string or an array of strings.
| idToken | - |
|
protectedvirtual |
Parses id token.
| serializedIdToken | - |
| expectedNonce | - |
|
protectedvirtual |
|
protectedvirtual |
Validates ID-token "aud" and "azp" claims against the client id.
| idToken | - |
| tenduke::oidc::OIDCException | if the ID-token is not issued to this client |
|
protectedvirtual |
Validates ID-token time claims "exp" (required), "nbf" and "iat" against current time, allowing clock skew of OIDCConfiguration::allowedClockSkewS.
| idToken | - |
| tenduke::oidc::OIDCException | if the ID-token is expired, not yet valid or issued in the future |