LeviLamina
Loading...
Searching...
No Matches
EduSso.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/certificates/identity/Enum.h"
7#include "mc/certificates/identity/IEduSsoStrategy.h"
8#include "mc/certificates/identity/SsoPromptMode.h"
9#include "mc/deps/identity/edu_common/EduResourceType.h"
10#include "mc/platform/Result.h"
11
12// auto generated forward declare list
13// clang-format off
14struct AccessTokenInfo;
15namespace Identity { class IEduAuth; }
16namespace Identity { struct AuthError; }
17namespace Identity { struct AuthToken; }
18namespace Json { class Value; }
19namespace Identity { struct ISettingStorageStrategy; }
20// clang-format on
21
22namespace Identity::Strategies {
23
24class EduSso : public ::Identity::IEduSsoStrategy {
25public:
26 // member variables
27 // NOLINTBEGIN
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 EduSso& operator=(EduSso const&);
36 EduSso(EduSso const&);
37 EduSso();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42#ifdef LL_PLAT_S
43 virtual ::Json::Value clientConfig(::Json::Value const&) const /*override*/;
44#else // LL_PLAT_C
45 virtual ::Json::Value clientConfig(::Json::Value const& loginResponse) const /*override*/;
46#endif
47
48#ifdef LL_PLAT_S
49 virtual ::Identity::_TokenRefreshState::Enum refreshToken(
51 ::AccessTokenInfo const&,
52 int64,
53 ::Identity::EduResourceType,
55 ::std::function<void()>
56 ) /*override*/;
57#else // LL_PLAT_C
58 virtual ::Identity::_TokenRefreshState::Enum refreshToken(
60 ::AccessTokenInfo const& info,
61 int64 currentTime,
62 ::Identity::EduResourceType eduIdentityResource,
64 ::std::function<void()> refreshingToken
65 ) /*override*/;
66#endif
67
68#ifdef LL_PLAT_S
69 virtual void onRefreshedToken(bool, ::Identity::EduResourceType) /*override*/;
70#else // LL_PLAT_C
71 virtual void onRefreshedToken(bool failed, ::Identity::EduResourceType eduIdentityResource) /*override*/;
72#endif
73
74#ifdef LL_PLAT_S
75 virtual ::Identity::SsoPromptMode signIn(
77 int64,
78 ::std::function<void()>,
79 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)>
80 ) /*override*/;
81#else // LL_PLAT_C
82 virtual ::Identity::SsoPromptMode signIn(
84 int64 currentTime,
85 ::std::function<void()> showingDialogBoxCallback,
86 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
87 ) /*override*/;
88#endif
89
90#ifdef LL_PLAT_S
91 virtual void signInSuccess(::std::string const&) /*override*/;
92#else // LL_PLAT_C
93 virtual void signInSuccess(::std::string const& userHint) /*override*/;
94#endif
95
96 virtual void demoSignInSuccess() /*override*/;
97
98#ifdef LL_PLAT_S
99 virtual void resetAuthentication(::Identity::IEduAuth&, bool) /*override*/;
100#else // LL_PLAT_C
101 virtual void resetAuthentication(::Identity::IEduAuth& auth, bool resetUIState) /*override*/;
102#endif
103
104 virtual bool isDemoConversion() const /*override*/;
105
106#ifdef LL_PLAT_S
107 virtual void signInGraph(
109 ::std::string const&,
110 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)>
111 ) /*override*/;
112#else // LL_PLAT_C
113 virtual void signInGraph(
115 ::std::string const& userId,
116 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
117 ) /*override*/;
118#endif
119
120 // NOLINTEND
121
122public:
123 // member functions
124 // NOLINTBEGIN
125#ifdef LL_PLAT_C
126 MCNAPI explicit EduSso(::Identity::ISettingStorageStrategy& settings);
127#endif
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133#ifdef LL_PLAT_C
134 MCNAPI void* $ctor(::Identity::ISettingStorageStrategy& settings);
135#endif
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141#ifdef LL_PLAT_C
142 MCNAPI ::Json::Value $clientConfig(::Json::Value const& loginResponse) const;
143
144 MCNAPI ::Identity::_TokenRefreshState::Enum $refreshToken(
146 ::AccessTokenInfo const& info,
147 int64 currentTime,
148 ::Identity::EduResourceType eduIdentityResource,
150 ::std::function<void()> refreshingToken
151 );
152
153 MCNAPI void $onRefreshedToken(bool failed, ::Identity::EduResourceType eduIdentityResource);
154
155 MCNAPI ::Identity::SsoPromptMode $signIn(
157 int64 currentTime,
158 ::std::function<void()> showingDialogBoxCallback,
159 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
160 );
161
162 MCNAPI void $signInSuccess(::std::string const& userHint);
163
164 MCNAPI void $demoSignInSuccess();
165
166 MCNAPI void $resetAuthentication(::Identity::IEduAuth& auth, bool resetUIState);
167
168 MCNAPI bool $isDemoConversion() const;
169
170 MCNAPI void $signInGraph(
172 ::std::string const& userId,
173 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
174 );
175#endif
176
177
178 // NOLINTEND
179
180public:
181 // vftables
182 // NOLINTBEGIN
183 MCNAPI static void** $vftable();
184 // NOLINTEND
185};
186
187} // namespace Identity::Strategies
Definition Result.h:9
Definition IEduAuth.h:21
Definition IEduSsoStrategy.h:22
static MCAPI void ** $vftable()
Definition Value.h:16
Definition AccessTokenInfo.h:5
Definition AuthError.h:7
Definition AuthToken.h:7
Definition ISettingStorageStrategy.h:7
Definition Alias.h:14