1#ifndef SOURCEMETA_CORE_OAUTH_AUTHORIZATION_H_
2#define SOURCEMETA_CORE_OAUTH_AUTHORIZATION_H_
4#ifndef SOURCEMETA_CORE_OAUTH_EXPORT
5#include <sourcemeta/core/oauth_export.h>
8#include <sourcemeta/core/oauth_profile.h>
17namespace sourcemeta::core {
90 std::span<const OAuthParameter>
extra;
116SOURCEMETA_CORE_OAUTH_EXPORT
119 std::string &sink) -> void;
146SOURCEMETA_CORE_OAUTH_EXPORT
148 const std::string_view query, std::string &storage,
150 const std::function<
void(std::string_view, std::string_view)> &on_other)
170SOURCEMETA_CORE_OAUTH_EXPORT
172 const std::string_view presented,
187SOURCEMETA_CORE_OAUTH_EXPORT
234SOURCEMETA_CORE_OAUTH_EXPORT
236 std::string &storage,
266SOURCEMETA_CORE_OAUTH_EXPORT
268 const std::string_view redirect_uri,
294SOURCEMETA_CORE_OAUTH_EXPORT
296 const std::string_view redirect_uri,
336SOURCEMETA_CORE_OAUTH_EXPORT
338 -> std::optional<OAuthResponseMode>;
354SOURCEMETA_CORE_OAUTH_EXPORT
380SOURCEMETA_CORE_OAUTH_EXPORT
382 const std::string_view redirect_uri,
384 std::string &sink) -> bool;
406SOURCEMETA_CORE_OAUTH_EXPORT
408 const std::string_view redirect_uri,
410 std::string &sink) -> bool;
435SOURCEMETA_CORE_OAUTH_EXPORT
437 const std::string_view redirect_uri,
439 const std::string_view title =
"Submit This Form") -> bool;
463SOURCEMETA_CORE_OAUTH_EXPORT
465 const std::string_view redirect_uri,
467 const std::string_view title =
"Submit This Form") -> bool;
std::string_view error_description
Definition oauth_authorization.h:208
std::string_view code_challenge
The PKCE code challenge (RFC 7636 Section 4.3).
Definition oauth_authorization.h:70
std::string_view state
The state value echoed from the request (RFC 6749 Section 4.1.2).
Definition oauth_authorization.h:201
std::string_view state
Definition oauth_authorization.h:68
std::span< const OAuthParameter > extra
Definition oauth_authorization.h:90
std::span< const OAuthParameter > resources
Definition oauth_authorization.h:87
std::string_view iss
The issuer identifier of the authorization server (RFC 9207 Section 2).
Definition oauth_authorization.h:203
std::string_view error_uri
Definition oauth_authorization.h:211
std::string_view response_type
Definition oauth_authorization.h:84
std::string_view redirect_uri
Definition oauth_authorization.h:63
std::string_view code_challenge_method
Definition oauth_authorization.h:73
std::string_view value
The parameter value, still in its raw unescaped form.
Definition oauth_authorization.h:33
std::string_view error
The error code of a failure response (RFC 6749 Section 4.1.2.1).
Definition oauth_authorization.h:205
std::string_view dpop_jkt
The JWK thumbprint of the DPoP proof public key (RFC 9449 Section 10).
Definition oauth_authorization.h:77
std::string_view request_uri
The reference to a pushed authorization request (RFC 9126 Section 4).
Definition oauth_authorization.h:75
std::string_view code
The authorization code (RFC 6749 Section 4.1.2).
Definition oauth_authorization.h:199
std::string_view name
The parameter name.
Definition oauth_authorization.h:31
std::string_view client_id
The client identifier (RFC 6749 Section 2.2).
Definition oauth_authorization.h:60
std::string_view scope
The space-delimited requested scope (RFC 6749 Section 3.3).
Definition oauth_authorization.h:65
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_default_response_mode(const std::string_view response_type) -> std::optional< OAuthResponseMode >
OAuthResponseMode
Definition oauth_authorization.h:303
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_authorization_error_redirect(const std::string_view redirect_uri, const OAuthAuthorizationResponse &response, std::string &sink) -> bool
OAuthProfile
Definition oauth_profile.h:23
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_parse_authorization_response(const std::string_view query, std::string &storage, OAuthAuthorizationResponse &result) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_authorization_url(const std::string_view endpoint, const OAuthAuthorizationRequest &request, std::string &sink) -> void
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_authorization_redirect(const std::string_view redirect_uri, const OAuthAuthorizationResponse &response, std::string &sink) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_parse_authorization_request(const std::string_view query, std::string &storage, OAuthAuthorizationRequest &result, const std::function< void(std::string_view, std::string_view)> &on_other) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_is_response_mode_allowed(const std::string_view response_type, const OAuthResponseMode mode) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_is_private_use_scheme(const std::string_view scheme) noexcept -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_redirect_uri_matches(const std::string_view registered, const std::string_view presented, const OAuthProfile profile) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_authorization_form_post(const std::string_view redirect_uri, const OAuthAuthorizationResponse &response, std::string &sink, const std::string_view title="Submit This Form") -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_authorization_error_form_post(const std::string_view redirect_uri, const OAuthAuthorizationResponse &response, std::string &sink, const std::string_view title="Submit This Form") -> bool
@ Fragment
Definition oauth_authorization.h:311
@ Query
Definition oauth_authorization.h:307
@ FormPost
Definition oauth_authorization.h:315