LeviLamina
Loading...
Searching...
No Matches
WebToken.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/json/Value.h"
5
6// auto generated inclusion list
7#include "mc/deps/json/Value.h"
8
9// auto generated forward declare list
10// clang-format off
14// clang-format on
15
16class WebToken {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::std::string mHeader;
21 ::Json::Value mHeaderInfo;
22 ::std::string mData;
23 ::Json::Value mDataInfo;
24 ::std::string mSignature;
25 // NOLINTEND
26
27#ifdef LL_PLAT_S
28public:
29 WebToken() = default;
30
31#else // LL_PLAT_C
32public:
33 // prevent constructor by default
34 WebToken& operator=(WebToken const&);
35 WebToken(WebToken const&);
36
37#endif
38public:
39 // member functions
40 // NOLINTBEGIN
41#ifdef LL_PLAT_C
42 MCAPI WebToken();
43
44 MCAPI WebToken(::WebToken&&);
45#endif
46
47 MCAPI explicit WebToken(::std::string token);
48
49 MCAPI ::std::string _signatureToDER() const;
50
51 MCAPI ::std::string getKeyId() const;
52
53#ifdef LL_PLAT_C
54 MCAPI ::std::string getSignerPublicKey() const;
55
56 MCAPI ::WebToken& operator=(::WebToken&&);
57#endif
58
59#ifdef LL_PLAT_S
60 MCAPI ::std::string toString() const;
61#endif
62
63 MCAPI bool verifyWithExternalKey(::std::string const& publicKey) const;
64
65 MCAPI bool verifyWithIncludedKey(::std::vector<::std::string> const& trustedKeys) const;
66
67 MCAPI ~WebToken();
68 // NOLINTEND
69
70public:
71 // static functions
72 // NOLINTBEGIN
73 MCAPI static ::std::string _DERToBinary(::std::string const& derSignature, int outputLength);
74
75 MCAPI static ::std::unique_ptr<::WebToken> createFromData(
76 ::Json::Value const& dataInfo,
77 ::PrivateKeyManager const& manager,
78 ::std::variant<::PublicKeySignatureType, ::CertificateSNIType> signatureType,
79 ::Json::Value const& additionalHeaderClaims
80 );
81 // NOLINTEND
82
83public:
84 // constructor thunks
85 // NOLINTBEGIN
86#ifdef LL_PLAT_C
87 MCAPI void* $ctor();
88
89 MCAPI void* $ctor(::WebToken&&);
90#endif
91
92 MCAPI void* $ctor(::std::string token);
93 // NOLINTEND
94
95public:
96 // destructor thunk
97 // NOLINTBEGIN
98 MCAPI void $dtor();
99 // NOLINTEND
100};
Definition Value.h:16
Definition PrivateKeyManager.h:9
Definition CertificateSNIType.h:5
Definition PublicKeySignatureType.h:5