Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
jose_error.h
1#ifndef SOURCEMETA_CORE_JOSE_ERROR_H_
2#define SOURCEMETA_CORE_JOSE_ERROR_H_
3
4#ifndef SOURCEMETA_CORE_JOSE_EXPORT
5#include <sourcemeta/core/jose_export.h>
6#endif
7
8#include <exception> // std::exception
9
10namespace sourcemeta::core {
11
12#if defined(_MSC_VER)
13#pragma warning(disable : 4251 4275)
14#endif
15
18class SOURCEMETA_CORE_JOSE_EXPORT JWKParseError : public std::exception {
19public:
20 [[nodiscard]] auto what() const noexcept -> const char * override {
21 return "The input is not a valid JSON Web Key";
22 }
23};
24
27class SOURCEMETA_CORE_JOSE_EXPORT JWKSParseError : public std::exception {
28public:
29 [[nodiscard]] auto what() const noexcept -> const char * override {
30 return "The input is not a valid JSON Web Key Set";
31 }
32};
33
36class SOURCEMETA_CORE_JOSE_EXPORT JWTParseError : public std::exception {
37public:
38 [[nodiscard]] auto what() const noexcept -> const char * override {
39 return "The input is not a valid JSON Web Token";
40 }
41};
42
45class SOURCEMETA_CORE_JOSE_EXPORT JWEParseError : public std::exception {
46public:
47 [[nodiscard]] auto what() const noexcept -> const char * override {
48 return "The input is not a valid JSON Web Encryption object";
49 }
50};
51
52#if defined(_MSC_VER)
53#pragma warning(default : 4251 4275)
54#endif
55
56} // namespace sourcemeta::core
57
58#endif
Definition jose_error.h:45
Definition jose_error.h:18
Definition jose_error.h:27
Definition jose_error.h:36