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>
14namespace sourcemeta::core {
31SOURCEMETA_CORE_OAUTH_EXPORT
53SOURCEMETA_CORE_OAUTH_EXPORT
55 const std::string_view scheme,
56 const std::string_view name)
57 -> std::optional<std::string>;
111SOURCEMETA_CORE_OAUTH_EXPORT
135SOURCEMETA_CORE_OAUTH_EXPORT
157SOURCEMETA_CORE_OAUTH_EXPORT
179SOURCEMETA_CORE_OAUTH_EXPORT
std::string_view error_description
The human-readable error description (RFC 6750 Section 3).
Definition oauth_bearer.h:72
std::string_view error_uri
The URI of a human-readable error page (RFC 6750 Section 3).
Definition oauth_bearer.h:74
std::string_view error
The error code (RFC 6750 Section 3.1).
Definition oauth_bearer.h:70
std::string_view algs
Definition oauth_bearer.h:80
std::string_view scope
The space-delimited scope the token must carry (RFC 6750 Section 3).
Definition oauth_bearer.h:68
std::string_view resource_metadata
Definition oauth_bearer.h:77
std::string_view realm
The protection space the credentials apply to (RFC 6750 Section 3).
Definition oauth_bearer.h:66
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_has_scope(const JSON &claims, const std::string_view value) -> bool
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_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