Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
oidc_authentication.h
1#ifndef SOURCEMETA_CORE_OIDC_AUTHENTICATION_H_
2#define SOURCEMETA_CORE_OIDC_AUTHENTICATION_H_
3
4#ifndef SOURCEMETA_CORE_OIDC_EXPORT
5#include <sourcemeta/core/oidc_export.h>
6#endif
7
8#include <sourcemeta/core/oidc_profile.h>
9
10#include <array> // std::array
11#include <optional> // std::optional
12#include <string> // std::string
13#include <string_view> // std::string_view
14
15namespace sourcemeta::core {
16
29SOURCEMETA_CORE_OIDC_EXPORT
30auto oidc_nonce() -> std::array<char, 43>;
31
38 std::string_view client_id;
40 std::string_view redirect_uri;
43 std::string_view scope;
46 std::string_view response_type;
48 std::string_view state;
50 std::string_view code_challenge;
52 std::string_view code_challenge_method;
55 std::string_view nonce;
58 std::string_view display;
61 std::string_view prompt;
64 std::string_view max_age;
67 std::string_view ui_locales;
70 std::string_view id_token_hint;
73 std::string_view login_hint;
76 std::string_view acr_values;
79 std::string_view claims;
82 std::string_view request;
85 std::string_view request_uri;
88 std::string_view response_mode;
89};
90
121SOURCEMETA_CORE_OIDC_EXPORT
123 const std::string_view endpoint, const OIDCAuthenticationRequest &request,
124 std::string &sink, const OIDCProfile profile = OIDCProfile::Strict) -> bool;
125
142SOURCEMETA_CORE_OIDC_EXPORT
143auto oidc_authorization_url(const std::string_view authorization_endpoint,
144 const std::string_view client_id,
145 const std::string_view redirect_uri,
146 const std::string_view state,
147 const std::string_view code_challenge,
148 const std::string_view nonce)
149 -> std::optional<std::string>;
150
181SOURCEMETA_CORE_OIDC_EXPORT
183 const std::string_view query, std::string &storage,
185 const OIDCProfile profile = OIDCProfile::Strict) -> bool;
186
187} // namespace sourcemeta::core
188
189#endif
std::string_view state
The opaque CSRF state value (OpenID Connect Core 1.0 Section 3.1.2.1).
Definition oidc_authentication.h:48
std::string_view code_challenge_method
The PKCE code challenge method (RFC 7636 Section 4.3).
Definition oidc_authentication.h:52
std::string_view redirect_uri
The redirection URI (OpenID Connect Core 1.0 Section 3.1.2.1), REQUIRED.
Definition oidc_authentication.h:40
std::string_view response_type
Definition oidc_authentication.h:46
std::string_view ui_locales
Definition oidc_authentication.h:67
std::string_view client_id
The client identifier (OpenID Connect Core 1.0 Section 3.1.2.1), REQUIRED.
Definition oidc_authentication.h:38
std::string_view display
Definition oidc_authentication.h:58
std::string_view request
Definition oidc_authentication.h:82
std::string_view login_hint
Definition oidc_authentication.h:73
std::string_view scope
Definition oidc_authentication.h:43
std::string_view nonce
Definition oidc_authentication.h:55
std::string_view id_token_hint
Definition oidc_authentication.h:70
std::string_view max_age
Definition oidc_authentication.h:64
std::string_view response_mode
Definition oidc_authentication.h:88
std::string_view claims
Definition oidc_authentication.h:79
std::string_view prompt
Definition oidc_authentication.h:61
std::string_view acr_values
Definition oidc_authentication.h:76
std::string_view code_challenge
The PKCE code challenge (RFC 7636 Section 4.3).
Definition oidc_authentication.h:50
std::string_view request_uri
Definition oidc_authentication.h:85
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_parse_authentication_request(const std::string_view query, std::string &storage, OIDCAuthenticationRequest &result, const OIDCProfile profile=OIDCProfile::Strict) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_build_authentication_url(const std::string_view endpoint, const OIDCAuthenticationRequest &request, std::string &sink, const OIDCProfile profile=OIDCProfile::Strict) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_nonce() -> std::array< char, 43 >
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_authorization_url(const std::string_view authorization_endpoint, const std::string_view client_id, const std::string_view redirect_uri, const std::string_view state, const std::string_view code_challenge, const std::string_view nonce) -> std::optional< std::string >
OIDCProfile
Definition oidc_profile.h:24
@ Strict
Definition oidc_profile.h:27
Definition oidc_authentication.h:36