LeviLamina
Loading...
Searching...
No Matches
ActiveDirectoryIdentity.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/minecraft/threading/EnableQueueForMainThread.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/identity/edu_common/ActiveDirectoryAuthenticationState.h"
10#include "mc/options/EducationServicesEnvironment.h"
11#include "mc/platform/Result.h"
12
13// auto generated forward declare list
14// clang-format off
16class IEDUSystems;
18struct AccessTokenInfo;
19namespace Identity { class IEduAuth; }
20namespace Identity { class IEduSsoStrategy; }
21namespace Identity { struct ActiveDirectoryIdentityParameters; }
22namespace Identity { struct AuthError; }
23namespace Identity { struct AuthToken; }
24namespace Identity { struct EduAuthParameters; }
25namespace Identity { struct ISettingStorageStrategy; }
26namespace Identity { struct ServiceResponse; }
27namespace Identity { struct SignOutResult; }
28namespace WebServices::EduSignin { struct SigninResponse; }
29namespace edu::auth { struct CredentialsObserver; }
30// clang-format on
31
32class ActiveDirectoryIdentity : public ::Bedrock::EnableNonOwnerReferences,
34public:
35 // member variables
36 // NOLINTBEGIN
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 ActiveDirectoryIdentity& operator=(ActiveDirectoryIdentity const&);
55 ActiveDirectoryIdentity(ActiveDirectoryIdentity const&);
56 ActiveDirectoryIdentity();
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61#ifdef LL_PLAT_S
62 virtual ~ActiveDirectoryIdentity() /*override*/ = default;
63#else // LL_PLAT_C
64 virtual ~ActiveDirectoryIdentity() /*override*/;
65#endif
66
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCNAPI_C void _authenticateDemoWithService();
73
74 MCNAPI_C void _authenticateSignInWithService();
75
76 MCNAPI_C void _executeOnMainThread(::std::function<void()>&& callback);
77
78 MCNAPI_C void _handleAuthenticationResponse(::WebServices::EduSignin::SigninResponse& response);
79
80 MCNAPI_C void _identityGained();
81
82 MCNAPI_C void _identityLost();
83
84 MCNAPI_C void _onError(
85 ::std::string const& error,
86 ::ActiveDirectoryAuthenticationState newState,
87 ::std::vector<::std::pair<::std::string, ::std::string>> details
88 );
89
90 MCNAPI_C void _onStatusChanged(::ActiveDirectoryAuthenticationState from, ::ActiveDirectoryAuthenticationState to);
91
92 MCNAPI_C ::AccessTokenInfo _parseTokenInfo(::std::string const& tokenToParse) const;
93
94 MCNAPI_C void _populateResponse(::WebServices::EduSignin::SigninResponse const& response);
95
96 MCNAPI_C void _signInCanceled();
97
98 MCNAPI_C void _updateData(
100 bool isRefresh
101 );
102
103 MCNAPI_C void _updateGraphData(
105 bool isRefresh
106 );
107
108 MCNAPI_C void addObserver(::edu::auth::CredentialsObserver& observer);
109
110 MCNAPI_C void getIdentity();
111
112 MCNAPI_C void resetAuthenticationState();
113
114 MCNAPI_C void signOut(::std::function<void(::Identity::SignOutResult)> callback) const;
115
116 MCNAPI_C void tick();
117 // NOLINTEND
118
119public:
120 // static variables
121 // NOLINTBEGIN
122 MCNAPI static ::std::string const& IS_VALID_FIELD();
123
124 MCNAPI static ::std::string const& JWT_EXPIRATION_FIELD();
125
126 MCNAPI static ::std::string const& JWT_REQUEST_ID_FIELD();
127
128 MCNAPI static ::std::string const& PAYLOAD_FIELD();
129
130 MCNAPI static ::std::string const& PUBLIC_KEY();
131
132 MCNAPI static ::std::string const& REQUEST_ID_FIELD();
133
134 MCNAPI static ::std::string const& RESPONSE_FIELD();
135
136 MCNAPI static ::std::string& mCachedServiceEndpoint();
137 // NOLINTEND
138
139public:
140 // constructor thunks
141 // NOLINTBEGIN
142 MCNAPI_C void* $ctor(
143 ::Bedrock::NotNullNonOwnerPtr<::IEDUSystems> eduSystems,
145 );
146
147 MCNAPI_C void* $ctor(
149 ::std::optional<::EducationServicesEnvironment> environment,
150 ::std::unique_ptr<::IActiveDirectoryIdentityTelemetry>&& eventing,
151 ::std::unique_ptr<::Identity::ISettingStorageStrategy>&& settings,
152 ::std::unique_ptr<::Identity::IEduSsoStrategy>&& sso,
153 ::std::function<::std::unique_ptr<::Identity::IEduAuth>(::Identity::EduAuthParameters&&)> createAuth,
154 ::std::unique_ptr<::ResponseVerifier> verifier,
155 ::std::string appSessionId
156 );
157 // NOLINTEND
158
159public:
160 // destructor thunk
161 // NOLINTBEGIN
162 MCNAPI void $dtor();
163 // NOLINTEND
164
165public:
166 // vftables
167 // NOLINTBEGIN
169
171 // NOLINTEND
172};
static MCAPI ::std::string const & REQUEST_ID_FIELD()
static MCAPI ::std::string const & RESPONSE_FIELD()
static MCAPI ::std::string const & JWT_EXPIRATION_FIELD()
static MCAPI ::std::string const & JWT_REQUEST_ID_FIELD()
static MCAPI ::std::string const & PAYLOAD_FIELD()
static MCAPI ::std::string const & IS_VALID_FIELD()
static MCAPI ::std::string const & PUBLIC_KEY()
static MCAPI ::std::string & mCachedServiceEndpoint()
static MCAPI void ** $vftableForEnableQueueForMainThread()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Result.h:9
Definition EnableQueueForMainThread.h:17
Definition IActiveDirectoryIdentityTelemetry.h:11
Definition IEDUSystems.h:16
Definition IEduAuth.h:20
Definition IEduSsoStrategy.h:22
Definition ResponseVerifier.h:10
Definition AccessTokenInfo.h:5
Definition ActiveDirectoryIdentityParameters.h:7
Definition AuthError.h:7
Definition AuthToken.h:7
Definition EduAuthParameters.h:7
Definition ISettingStorageStrategy.h:12
Definition ServiceResponse.h:7
Definition SignOutResult.h:7
Definition SigninResponse.h:7
Definition CredentialsObserver.h:25
Definition Alias.h:14