Skip to content
LeviMC
English
AutoLightDark
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& userHint,
72 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
73 ) /*override*/;
74
75 virtual void signInSharePoint(
77 ::std::string const& userId,
78 ::std::string const& spoResource,
79 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)>&&
80 callback
81 ) /*override*/;
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87#ifdef LL_PLAT_C
88 MCNAPI ::Json::Value $clientConfig(::Json::Value const& loginResponse) const;
89
90 MCNAPI ::Identity::_TokenRefreshState::Enum $refreshToken(
92 ::AccessTokenInfo const& info,
93 int64 currentTime,
94 ::Identity::EduResourceType eduIdentityResource,
96 ::std::function<void()> refreshingToken
97 );
98
99 MCNAPI void $onRefreshedToken(bool failed, ::Identity::EduResourceType eduIdentityResource);
100
101 MCNAPI ::Identity::SsoPromptMode $signIn(
103 int64 currentTime,
104 ::std::function<void()> showingDialogBoxCallback,
105 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
106 );
107
108 MCNAPI void $signInSuccess(::std::string const& userHint);
109
110 MCNAPI void $demoSignInSuccess();
111
112 MCNAPI void $resetAuthentication(::Identity::IEduAuth& auth, bool resetUIState);
113
114 MCNAPI bool $isDemoConversion() const;
115
116 MCNAPI void $signInGraph(
118 ::std::string const& userHint,
119 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)> callback
120 );
121
122 MCNAPI void $signInSharePoint(
124 ::std::string const& userId,
125 ::std::string const& spoResource,
126 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)>&&
127 callback
128 );
129#endif
130
131
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCNAPI static void** $vftable();
138 // NOLINTEND
139};
140
141} // 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