LeviLamina
Loading...
Searching...
No Matches
GameServerToken.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/certificates/WebToken.h"
7
8// auto generated forward declare list
9// clang-format off
14namespace mce { class UUID; }
16// clang-format on
17
18class GameServerToken {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<1, 1, bool> mIsSelfSigned;
23 ::ll::TypedStorage<1, 1, bool> mIsValid;
24 ::ll::TypedStorage<8, 128, ::WebToken> mRawToken;
25 // NOLINTEND
26
27public:
28 // prevent constructor by default
29 GameServerToken();
30
31public:
32 // member functions
33 // NOLINTBEGIN
34 MCAPI explicit GameServerToken(::std::string const& tokenString);
35
36 MCAPI ::std::string getIdentityPublicKey() const;
37
38 MCAPI bool getIsHost() const;
39
40 MCAPI ::mce::UUID getLegacyUuid() const;
41
42 MCAPI int64 getMinecraftAccountPermissions() const;
43
44 MCAPI ::std::string getNintendoName() const;
45
46 MCAPI ::std::string getNintendoServiceId() const;
47
48 MCAPI ::std::string getPlayFabId() const;
49
50 MCAPI ::std::string getPlayStationName() const;
51
52 MCAPI ::std::string getPsnId() const;
53
54 MCAPI ::PlayerAuthenticationInfo getTrustedInfo() const;
55
56 MCAPI ::std::string getXboxLiveName() const;
57
58 MCAPI ::std::string getXuid() const;
59
60 MCAPI bool hasMatchingIssuer(::MinecraftServiceKeyManager const& serviceKeyManager);
61
62 MCAPI bool validate(::MinecraftServiceKeyManager const& serviceKeyManager, int64 currentTime, bool checkExpiration);
63
64 MCAPI bool validateSelfSigned(int64 currentTime, bool checkExpiration);
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCAPI static bool _checkExpiration(::WebToken const& token, int64 currentTime);
71
72 MCAPI static bool _validate(
73 ::WebToken const& token,
74 ::MinecraftServiceKeyManager const& keyManager,
75 int64 currentTime,
76 bool checkExpiration
77 );
78
79 MCAPI static bool _validateSelfSigned(::WebToken const& token, int64 currentTime, bool checkExpiration);
80
81 MCAPI static ::GameServerToken create(::RawGameServerToken const& rawToken);
82
83#ifdef LL_PLAT_C
84 MCAPI static ::RawGameServerToken createLocal(
85 ::PrivateKeyManager const& signer,
86 int64 expirationDate,
87 ::std::string const& keyId,
88 ::PlayerAuthenticationInfo const& claims
89 );
90#endif
91
92 MCAPI static ::GameServerToken createSelfSigned(::RawGameServerToken const& rawToken);
93
94#ifdef LL_PLAT_C
95 MCAPI static ::PlayerAuthenticationInfo
96 trustTokenWeAreAbsolutelySureIsLocal(::LocalGameServerToken const& localToken);
97#endif
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI void* $ctor(::std::string const& tokenString);
104 // NOLINTEND
105};
Definition MinecraftServiceKeyManager.h:19
Definition PrivateKeyManager.h:9
Definition WebToken.h:16
Definition UUID.h:7
Definition LocalGameServerToken.h:5
Definition PlayerAuthenticationInfo.h:9
Definition RawGameServerToken.h:8