1#ifndef SOURCEMETA_CORE_OIDC_ERROR_H_
2#define SOURCEMETA_CORE_OIDC_ERROR_H_
4#ifndef SOURCEMETA_CORE_OIDC_EXPORT
5#include <sourcemeta/core/oidc_export.h>
8#include <sourcemeta/core/error.h>
14namespace sourcemeta::core {
16SOURCEMETA_CORE_ERROR_WARNINGS_PUSH
21class SOURCEMETA_CORE_OIDC_EXPORT OIDCMetadataParseError :
public Error {
23 OIDCMetadataParseError() noexcept
24 :
Error{
"The input is not a valid OpenID Provider metadata document"} {}
30class SOURCEMETA_CORE_OIDC_EXPORT OIDCRegistrationParseError :
public Error {
32 OIDCRegistrationParseError() noexcept
33 :
Error{
"The input is not a valid OpenID Connect client registration "
37SOURCEMETA_CORE_ERROR_WARNINGS_POP
79SOURCEMETA_CORE_OIDC_EXPORT
95SOURCEMETA_CORE_OIDC_EXPORT
97 -> std::optional<OIDCAuthenticationError>;
Error(const StaticString message) noexcept
Construct the error given its message.
Definition error_base.h:84
SOURCEMETA_CORE_OIDC_EXPORT auto oidc_error_code(const OIDCAuthenticationError error) noexcept -> std::string_view
OIDCAuthenticationError
Definition oidc_error.h:42
SOURCEMETA_CORE_OIDC_EXPORT auto to_oidc_authentication_error(const std::string_view code) noexcept -> std::optional< OIDCAuthenticationError >
@ RequestNotSupported
The provider does not support the request parameter.
Definition oidc_error.h:60
@ RegistrationNotSupported
The provider does not support the registration parameter.
Definition oidc_error.h:64
@ InteractionRequired
Definition oidc_error.h:45
@ AccountSelectionRequired
Definition oidc_error.h:51
@ ConsentRequired
Definition oidc_error.h:54
@ RequestURINotSupported
The provider does not support the request_uri parameter.
Definition oidc_error.h:62
@ InvalidRequestURI
The request_uri is invalid or unreachable.
Definition oidc_error.h:56
@ LoginRequired
Definition oidc_error.h:48
@ InvalidRequestObject
The request object is invalid.
Definition oidc_error.h:58