1#ifndef SOURCEMETA_CORE_OAUTH_BEARER_H_
2#define SOURCEMETA_CORE_OAUTH_BEARER_H_
4#ifndef SOURCEMETA_CORE_OAUTH_EXPORT
5#include <sourcemeta/core/oauth_export.h>
8#include <sourcemeta/core/json.h>
15namespace sourcemeta::core {
32SOURCEMETA_CORE_OAUTH_EXPORT
54SOURCEMETA_CORE_OAUTH_EXPORT
56 const std::string_view scheme,
57 const std::string_view name)
58 -> std::optional<std::string>;
112SOURCEMETA_CORE_OAUTH_EXPORT
136SOURCEMETA_CORE_OAUTH_EXPORT
158SOURCEMETA_CORE_OAUTH_EXPORT
213SOURCEMETA_CORE_OAUTH_EXPORT
236SOURCEMETA_CORE_OAUTH_EXPORT
std::string_view error_description
The human-readable error description (RFC 6750 Section 3).
Definition oauth_bearer.h:73
std::string_view error_uri
The URI of a human-readable error page (RFC 6750 Section 3).
Definition oauth_bearer.h:75
std::string_view error
The error code (RFC 6750 Section 3.1).
Definition oauth_bearer.h:71
std::string_view algs
Definition oauth_bearer.h:81
std::string_view scope
The space-delimited scope the token must carry (RFC 6750 Section 3).
Definition oauth_bearer.h:69
std::string_view resource_metadata
Definition oauth_bearer.h:78
std::string_view realm
The protection space the credentials apply to (RFC 6750 Section 3).
Definition oauth_bearer.h:67
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_has_scope(const JSON &claims, const std::string_view value) -> bool
OAuthScopeDecision
Definition oauth_bearer.h:163
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_challenge(const std::string_view scheme, const OAuthChallenge &challenge, std::string &sink) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_bearer_header(const std::string_view token, std::string &sink) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_is_dpop_bound(const JSON &claims) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_scope_request_accepts(const JSON &claims, const JSON &request) -> OAuthScopeDecision
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_challenge_parameter(const std::string_view header, const std::string_view scheme, const std::string_view name) -> std::optional< std::string >
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_has_audience(const JSON &claims, const std::string_view audience) -> bool
@ Accepted
The granted scope satisfies the rule.
Definition oauth_bearer.h:165
@ Unreadable
Definition oauth_bearer.h:171
@ Refused
Definition oauth_bearer.h:168