1#ifndef TENDUKE_OIDC_BASEOIDCCLIENT_H
2#define TENDUKE_OIDC_BASEOIDCCLIENT_H
4#include "../OIDCClient.h"
5#include "../OIDCRefreshRequest.h"
6#include "../OIDCConfiguration.h"
7#include "../OIDCConfiguration.h"
8#include "../../oauth/OAuthClient.h"
10#include "http/HTTPClient.h"
11#include "jwt/JWTParser.h"
15namespace tenduke {
namespace oidc {
33 const std::shared_ptr<const tenduke::oauth::OAuthClient> &oauthClient,
34 const std::shared_ptr<const tenduke::jwt::JWTParser> &jwtParser,
35 const std::shared_ptr<const tenduke::http::HTTPClient> &httpClient
43 std::unique_ptr<const tenduke::oidc::OIDCRefreshRequest>
refresh(
const std::shared_ptr<tenduke::oidc::OIDCState>& state)
const override;
56 std::string
requestUserinfo(
const std::string &accessToken)
const override;
67 const std::shared_ptr<const tenduke::oauth::OAuthClient> oauthClient;
73 const std::shared_ptr<const tenduke::jwt::JWTParser>
parseJWT;
75 const std::shared_ptr<const tenduke::http::HTTPClient>
http;
Base-class for OIDC-clients.
Definition BaseOIDCClient.h:22
static std::string ensureOpenIDScope(const std::string &scopes)
Checks if provided scopes have openid among them.
Definition BaseOIDCClient.cpp:81
const std::shared_ptr< const tenduke::http::HTTPClient > http
HTTP-client.
Definition BaseOIDCClient.h:75
std::unique_ptr< const tenduke::oidc::OIDCRefreshRequest > refresh(const std::shared_ptr< tenduke::oidc::OIDCState > &state) const override
Refreshes the OIDC state.
Definition BaseOIDCClient.cpp:52
const std::shared_ptr< const tenduke::oidc::OIDCConfiguration > oidcConfiguration
OIDC-configuration.
Definition BaseOIDCClient.h:71
std::string requestUserinfo(const std::string &accessToken) const override
Requests user information from "userinfo"-endpoint.
Definition BaseOIDCClient.cpp:63
const std::shared_ptr< const tenduke::jwt::JWTParser > parseJWT
JWT-parse for parsing ID-token.
Definition BaseOIDCClient.h:73
OpenID Connect -client.
Definition OIDCClient.h:22
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4