1#ifndef SOURCEMETA_CORE_OIDC_USERINFO_H_
2#define SOURCEMETA_CORE_OIDC_USERINFO_H_
4#ifndef SOURCEMETA_CORE_OIDC_EXPORT
5#include <sourcemeta/core/oidc_export.h>
8#include <sourcemeta/core/jose.h>
9#include <sourcemeta/core/json.h>
15namespace sourcemeta::core {
31SOURCEMETA_CORE_OIDC_EXPORT
33 const JSON &additional_claims) ->
JSON;
48SOURCEMETA_CORE_OIDC_EXPORT
50 const std::string_view expected_subject)
76SOURCEMETA_CORE_OIDC_EXPORT
78 const JWT &token,
const JWKS &keys,
79 const std::span<const JWSAlgorithm> allowed_algorithms,
80 const std::string_view expected_subject,
81 const std::string_view expected_issuer,
82 const std::string_view expected_client_id) -> std::optional<JSON>;
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_userinfo_matches_subject(const JSON &userinfo, const std::string_view expected_subject) -> bool
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_verify_userinfo(const JWT &token, const JWKS &keys, const std::span< const JWSAlgorithm > allowed_algorithms, const std::string_view expected_subject, const std::string_view expected_issuer, const std::string_view expected_client_id) -> std::optional< JSON >
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_build_userinfo(const std::string_view subject, const JSON &additional_claims) -> JSON