1#ifndef SOURCEMETA_CORE_OAUTH_TRANSACTION_H_
2#define SOURCEMETA_CORE_OAUTH_TRANSACTION_H_
4#ifndef SOURCEMETA_CORE_OAUTH_EXPORT
5#include <sourcemeta/core/oauth_export.h>
8#include <sourcemeta/core/oauth_authorization.h>
15namespace sourcemeta::core {
91SOURCEMETA_CORE_OAUTH_EXPORT
127SOURCEMETA_CORE_OAUTH_EXPORT
131 const std::string_view received_uri,
132 std::string_view &code)
133 -> std::optional<OAuthCallbackError>;
@ Issuer
The issuer claim is missing or does not match the expected value.
Definition jose_verify.h:28
std::array< char, 43 > state
The cross-site request forgery token (RFC 6749 Section 10.12).
Definition oauth_transaction.h:25
std::string_view state
The state sent with the request, compared against the callback.
Definition oauth_transaction.h:36
std::string_view code_verifier
The PKCE code verifier, carried through to the token request.
Definition oauth_transaction.h:38
std::string_view issuer
The issuer identifier the request was sent to (RFC 9207 Section 2).
Definition oauth_transaction.h:40
std::string_view redirect_uri
The redirection URI the request was sent with (RFC 8252 Section 8.10).
Definition oauth_transaction.h:42
std::array< char, 43 > code_verifier
The PKCE code verifier (RFC 7636 Section 4.1).
Definition oauth_transaction.h:27
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_transaction_mint() -> OAuthTransactionSecrets
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_transaction_check(const OAuthTransaction &transaction, const OAuthAuthorizationResponse &response, const OAuthIssuerSupport issuer_support, const std::string_view received_uri, std::string_view &code) -> std::optional< OAuthCallbackError >
OAuthCallbackError
Definition oauth_transaction.h:61
OAuthIssuerSupport
Definition oauth_transaction.h:49
@ State
Definition oauth_transaction.h:64
@ Declined
Definition oauth_transaction.h:73
@ ReceivedURI
Definition oauth_transaction.h:67
@ MissingCode
The response carries neither an error nor a code.
Definition oauth_transaction.h:75
@ Unknown
Support is unknown, so iss is validated only when present.
Definition oauth_transaction.h:55
@ NotSupported
The server is known not to support iss, so a present iss is ignored.
Definition oauth_transaction.h:53
@ Supported
The server supports iss, so a callback missing it is rejected.
Definition oauth_transaction.h:51