1#ifndef SOURCEMETA_CORE_OIDC_CLAIMS_H_
2#define SOURCEMETA_CORE_OIDC_CLAIMS_H_
4#ifndef SOURCEMETA_CORE_OIDC_EXPORT
5#include <sourcemeta/core/oidc_export.h>
8#include <sourcemeta/core/json.h>
15namespace sourcemeta::core {
28SOURCEMETA_CORE_OIDC_EXPORT
49SOURCEMETA_CORE_OIDC_EXPORT
51 const std::function<
void(std::string_view)> &on_claim)
67SOURCEMETA_CORE_OIDC_EXPORT
69 -> std::optional<std::string_view>;
105SOURCEMETA_CORE_OIDC_EXPORT
107 const std::span<const OIDCClaimRequest> userinfo_claims,
108 const std::span<const OIDCClaimRequest> id_token_claims) ->
JSON;
124SOURCEMETA_CORE_OIDC_EXPORT
126 const std::string_view target,
127 const std::string_view claim) -> bool;
143SOURCEMETA_CORE_OIDC_EXPORT
145 const std::string_view target,
146 const std::string_view claim) -> bool;
163SOURCEMETA_CORE_OIDC_EXPORT
165 const std::string_view target,
166 const std::string_view claim) ->
const JSON *;
183SOURCEMETA_CORE_OIDC_EXPORT
185 const std::string_view target,
186 const std::string_view claim,
187 const JSON &value) -> bool;
206SOURCEMETA_CORE_OIDC_EXPORT
std::span< const JSON > values
Definition oidc_claims.h:84
std::string_view name
The requested claim name.
Definition oidc_claims.h:76
bool essential
Whether the claim is essential (OpenID Connect Core 1.0 Section 5.5.1).
Definition oidc_claims.h:78
const JSON * value
Definition oidc_claims.h:81
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claims_parameter_requests(const JSON &claims, const std::string_view target, const std::string_view claim) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_scope_to_claims(const std::string_view scopes, const std::function< void(std::string_view)> &on_claim) -> void
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_build_claims_parameter(const std::span< const OIDCClaimRequest > userinfo_claims, const std::span< const OIDCClaimRequest > id_token_claims) -> JSON
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claim_request_accepts(const JSON &request, const JSON &value) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claims_parameter_is_essential(const JSON &claims, const std::string_view target, const std::string_view claim) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_is_standard_claim(const std::string_view name) noexcept -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claims_parameter_value(const JSON &claims, const std::string_view target, const std::string_view claim) -> const JSON *
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claims_parameter_accepts(const JSON &claims, const std::string_view target, const std::string_view claim, const JSON &value) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_claim_to_scope(const std::string_view claim) noexcept -> std::optional< std::string_view >