|
10Duke Enterprise C++ Client
|
#include <BaseOIDCClient.h>
Base-class for OIDC-clients.
Public Member Functions | |
| BaseOIDCClient (const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > &oidcConfiguration, const std::shared_ptr< const tenduke::oauth::OAuthClient > &oauthClient, const std::shared_ptr< const tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const tenduke::http::HTTPClient > &httpClient) | |
| Constructs new instance. | |
| std::unique_ptr< const tenduke::oidc::OIDCRefreshRequest > | refresh (const std::shared_ptr< tenduke::oidc::OIDCState > &state) const override |
| Refreshes the OIDC state. | |
| std::string | requestUserinfo (const std::string &accessToken) const override |
| Requests user information from "userinfo"-endpoint. | |
Static Protected Member Functions | |
| static std::string | ensureOpenIDScope (const std::string &scopes) |
Checks if provided scopes have openid among them. | |
Protected Attributes | |
| const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > | oidcConfiguration |
| OIDC-configuration. | |
| const std::shared_ptr< const tenduke::jwt::JWTParser > | parseJWT |
| JWT-parse for parsing ID-token. | |
| const std::shared_ptr< const tenduke::http::HTTPClient > | http |
| HTTP-client. | |
| tenduke::oidc::BaseOIDCClient::BaseOIDCClient | ( | const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > & | oidcConfiguration, |
| const std::shared_ptr< const tenduke::oauth::OAuthClient > & | oauthClient, | ||
| const std::shared_ptr< const tenduke::jwt::JWTParser > & | jwtParser, | ||
| const std::shared_ptr< const tenduke::http::HTTPClient > & | httpClient ) |
Constructs new instance.
| oidcConfiguration | - |
| oauthClient | - |
| jwtParser | - |
| httpClient | - |
|
staticprotected |
Checks if provided scopes have openid among them.
If not, adds it.
| scopes | - |
|
overridevirtual |
|
overridevirtual |
Requests user information from "userinfo"-endpoint.
(See https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)
Note: Return type may change in the future.
| accessToken | - |
| tenduke::http::HTTPResponseException | if HTTP-status codes indicate an error (e.g. 401, 404) |
| tenduke::http::HTTPException | if some HTTP-level error |
| tenduke::net:NetworkingException | if e.g. host not found, network connection issues etc. |
Implements tenduke::oidc::OIDCClient.