1#ifndef SOURCEMETA_CORE_OAUTH_PAR_H_
2#define SOURCEMETA_CORE_OAUTH_PAR_H_
4#ifndef SOURCEMETA_CORE_OAUTH_EXPORT
5#include <sourcemeta/core/oauth_export.h>
8#include <sourcemeta/core/crypto.h>
9#include <sourcemeta/core/json.h>
10#include <sourcemeta/core/oauth_authorization.h>
18namespace sourcemeta::core {
42SOURCEMETA_CORE_OAUTH_EXPORT
66SOURCEMETA_CORE_OAUTH_EXPORT
68 const std::string_view client_id,
69 const std::string_view request_uri,
70 std::string &sink) -> void;
98 [[nodiscard]]
auto request_uri() const -> std::optional<std::string_view>;
101 [[nodiscard]] auto
expires_in() const -> std::optional<std::chrono::seconds>;
133 const std::function<
void(std::string_view, std::string_view)> &on_other)
166[[nodiscard]] SOURCEMETA_CORE_OAUTH_EXPORT auto
168 const std::chrono::seconds expires_in)
169 -> std::optional<
JSON>;
188[[nodiscard]] SOURCEMETA_CORE_OAUTH_EXPORT auto
190 const std::optional<std::string_view> proof_thumbprint)
191 -> std::optional<std::string_view>;
auto request_uri() const -> std::optional< std::string_view >
auto data() const -> const JSON &
The underlying document.
auto expires_in() const -> std::optional< std::chrono::seconds >
OAuthPARResponse(const JSON &data)
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_par_authorization_url(const std::string_view endpoint, const std::string_view client_id, const std::string_view request_uri, std::string &sink) -> void
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_parse_par_request(const std::string_view body, SecureString &storage, OAuthAuthorizationRequest &result, const std::function< void(std::string_view, std::string_view)> &on_other) -> bool
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_build_par_request(const OAuthAuthorizationRequest &request, SecureString &sink) -> void
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_par_request_uri() -> std::string
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_par_dpop_binding(const std::string_view dpop_jkt, const std::optional< std::string_view > proof_thumbprint) -> std::optional< std::string_view >
SOURCEMETA_CORE_OAUTH_EXPORT auto oauth_make_par_response(const std::string_view request_uri, const std::chrono::seconds expires_in) -> std::optional< JSON >