Skip to content
LeviMC
English
AutoLightDark
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/crypto/asymmetric/system/System.h"
8#include "mc/deps/json/Value.h"
9
10// auto generated forward declare list
11// clang-format off
15// clang-format on
16
17class WebToken {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::std::string mHeader;
22 ::Json::Value mHeaderInfo;
23 ::std::string mData;
24 ::Json::Value mDataInfo;
25 ::std::string mSignature;
26 // NOLINTEND
27
28public:
29 WebToken() = default;
30
31public:
32 // member functions
33 // NOLINTBEGIN
34 MCNAPI WebToken(::WebToken const&);
35
36 MCNAPI ::std::string getKeyId() const;
37
38#ifdef LL_PLAT_C
39 MCNAPI ::std::string getSignerPublicKey() const;
40#endif
41
42 MCNAPI ::WebToken& operator=(::WebToken&&);
43
44 MCNAPI ::WebToken& operator=(::WebToken const&);
45
47 ::std::string const& publicKey,
48 ::std::optional<::Crypto::Asymmetric::System> expectedSystem
49 ) const;
50
51 MCNAPI bool verifyWithIncludedKey(::std::vector<::std::string> const& trustedKeys) const;
52
53 MCAPI ~WebToken();
54 // NOLINTEND
55
56public:
57 // static functions
58 // NOLINTBEGIN
59 MCNAPI static ::std::optional<::WebToken>
60 createFromData(::Json::Value const& dataInfo, ::PrivateKeyManager const& manager);
61
62#ifdef LL_PLAT_C
63 MCNAPI static ::std::optional<::WebToken> createFromData(
64 ::Json::Value const& dataInfo,
65 ::PrivateKeyManager const& manager,
66 ::Json::Value const& extraHeaders
67 );
68#endif
69
70 MCNAPI static ::std::optional<::WebToken> createFromData(
71 ::Json::Value const& dataInfo,
72 ::PrivateKeyManager const& manager,
73 ::Json::Value const& extraHeaders,
74 ::std::variant<::PublicKeySignatureType, ::CertificateSNIType> const& signatureType
75 );
76
77 MCNAPI static ::std::optional<::WebToken> parse(::std::string_view token, uint64 maxLength);
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCNAPI void* $ctor(::WebToken const&);
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCAPI void $dtor();
90 // NOLINTEND
91};
Definition Value.h:16
Definition PrivateKeyManager.h:10
MCAPI::WebToken & operator=(::WebToken &&)
MCAPI WebToken(::WebToken const &)
static MCAPI ::std::optional<::WebToken > createFromData(::Json::Value const &dataInfo, ::PrivateKeyManager const &manager, ::Json::Value const &extraHeaders, ::std::variant<::PublicKeySignatureType, ::CertificateSNIType > const &signatureType)
static MCAPI ::std::optional<::WebToken > parse(::std::string_view token, uint64 maxLength)
static MCAPI ::std::optional<::WebToken > createFromData(::Json::Value const &dataInfo, ::PrivateKeyManager const &manager)
MCAPI bool verifyWithExternalKey(::std::string const &publicKey, ::std::optional<::Crypto::Asymmetric::System > expectedSystem) const
MCAPI bool verifyWithIncludedKey(::std::vector<::std::string > const &trustedKeys) const
MCAPI void * $ctor(::WebToken const &)
MCAPI::std::string getKeyId() const
MCAPI::WebToken & operator=(::WebToken const &)
Definition CertificateSNIType.h:5
Definition PublicKeySignatureType.h:5