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; }
19// clang-format on
20
21namespace Identity::Strategies {
22
23class EduSso : public ::Identity::IEduSsoStrategy {
24public:
25 // member variables
26 // NOLINTBEGIN
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 EduSso& operator=(EduSso const&);
35 EduSso(EduSso const&);
36 EduSso();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ::Json::Value clientConfig(::Json::Value const& loginResponse) const /*override*/;
42
43 virtual ::Identity::_TokenRefreshState::Enum refreshToken(
45 ::AccessTokenInfo const& info,
46 int64 currentTime,
47 ::Identity::EduResourceType eduIdentityResource,
49 ::std::function<void()> refreshingToken
50 ) /*override*/;
51
52 virtual void onRefreshedToken(bool failed, ::Identity::EduResourceType eduIdentityResource) /*override*/;
53
54 virtual ::Identity::SsoPromptMode signIn(
56 int64 currentTime,
57 ::std::function<void()> showingDialogBoxCallback,
58 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
59 ) /*override*/;
60
61 virtual void signInSuccess(::std::string const& userHint) /*override*/;
62
63 virtual void demoSignInSuccess() /*override*/;
64
65 virtual void resetAuthentication(::Identity::IEduAuth& auth, bool resetUIState) /*override*/;
66
67 virtual bool isDemoConversion() const /*override*/;
68
69 virtual void signInGraph(
71 ::std::string const& userId,
72 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
73 ) /*override*/;
74
75 virtual ~EduSso() /*override*/ = default;
76 // NOLINTEND
77
78public:
79 // virtual function thunks
80 // NOLINTBEGIN
81#ifdef LL_PLAT_C
82 MCNAPI ::Json::Value $clientConfig(::Json::Value const& loginResponse) const;
83
84 MCNAPI ::Identity::_TokenRefreshState::Enum $refreshToken(
86 ::AccessTokenInfo const& info,
87 int64 currentTime,
88 ::Identity::EduResourceType eduIdentityResource,
90 ::std::function<void()> refreshingToken
91 );
92
93 MCNAPI void $onRefreshedToken(bool failed, ::Identity::EduResourceType eduIdentityResource);
94
95 MCNAPI ::Identity::SsoPromptMode $signIn(
97 int64 currentTime,
98 ::std::function<void()> showingDialogBoxCallback,
99 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
100 );
101
102 MCNAPI void $signInSuccess(::std::string const& userHint);
103
104 MCNAPI void $demoSignInSuccess();
105
106 MCNAPI void $resetAuthentication(::Identity::IEduAuth& auth, bool resetUIState);
107
108 MCNAPI bool $isDemoConversion() const;
109
110 MCNAPI void $signInGraph(
112 ::std::string const& userId,
113 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
114 );
115#endif
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCNAPI static void** $vftable();
124 // NOLINTEND
125};
126
127} // namespace Identity::Strategies
Definition Result.h:9
Definition IEduAuth.h:20
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 Alias.h:14