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
27public:
28 WebToken() = default;
29
30public:
31 // member functions
32 // NOLINTBEGIN
33 MCAPI explicit WebToken(::std::string token);
34
35 MCAPI ::std::string _signatureToDER() const;
36
37 MCAPI ::std::string getKeyId() const;
38
39 MCAPI_C ::std::string getSignerPublicKey() const;
40
41 MCAPI_S ::std::string toString() const;
42
43 MCAPI bool verifyWithExternalKey(::std::string const& publicKey) const;
44
45 MCAPI bool verifyWithIncludedKey(::std::vector<::std::string> const& trustedKeys) const;
46
47 MCAPI ~WebToken();
48 // NOLINTEND
49
50public:
51 // static functions
52 // NOLINTBEGIN
53 MCAPI static ::std::string _DERToBinary(::std::string const& derSignature, int outputLength);
54
55 MCAPI static ::std::unique_ptr<::WebToken> createFromData(
56 ::Json::Value const& dataInfo,
57 ::PrivateKeyManager const& manager,
58 ::std::variant<::PublicKeySignatureType, ::CertificateSNIType> signatureType,
59 ::Json::Value const& additionalHeaderClaims
60 );
61 // NOLINTEND
62
63public:
64 // constructor thunks
65 // NOLINTBEGIN
66 MCAPI_C void* $ctor();
67
68 MCAPI void* $ctor(::std::string token);
69 // NOLINTEND
70
71public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCAPI void $dtor();
75 // NOLINTEND
76};
Definition Value.h:16
Definition PrivateKeyManager.h:9
Definition CertificateSNIType.h:5
Definition PublicKeySignatureType.h:5