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/platform/Result.h"
11
12// auto generated forward declare list
13// clang-format off
14class IEDUSystems;
15struct AccessTokenInfo;
16namespace Identity { class IEduAuth; }
17namespace Identity { struct ActiveDirectoryIdentityParameters; }
18namespace Identity { struct AuthError; }
19namespace Identity { struct AuthToken; }
20namespace Identity { struct EduAuthParameters; }
21namespace Identity { struct ServiceResponse; }
22namespace WebServices::EduSignin { struct SigninResponse; }
23namespace Identity { struct SignOutResult; }
24// clang-format on
25
26class ActiveDirectoryIdentity : public ::Bedrock::EnableNonOwnerReferences,
28public:
29 // member variables
30 // NOLINTBEGIN
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 ActiveDirectoryIdentity& operator=(ActiveDirectoryIdentity const&);
49 ActiveDirectoryIdentity(ActiveDirectoryIdentity const&);
50 ActiveDirectoryIdentity();
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual ~ActiveDirectoryIdentity() /*override*/ = default;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61#ifdef LL_PLAT_C
62 MCNAPI ActiveDirectoryIdentity(
63 ::Bedrock::NotNullNonOwnerPtr<::IEDUSystems> eduSystems,
65 );
66
67 MCNAPI void _authenticateDemoWithService();
68
69 MCNAPI void _authenticateSignInWithService();
70
71 MCNAPI void _handleAuthenticationResponse(::WebServices::EduSignin::SigninResponse& response);
72
73 MCNAPI void _identityGained();
74
75 MCNAPI void _identityLost();
76
77 MCNAPI void _onError(
78 ::std::string const& error,
79 ::ActiveDirectoryAuthenticationState newState,
80 ::std::vector<::std::pair<::std::string, ::std::string>> details
81 );
82
83 MCNAPI void _onStatusChanged(::ActiveDirectoryAuthenticationState from, ::ActiveDirectoryAuthenticationState to);
84
85 MCNAPI ::AccessTokenInfo _parseTokenInfo(::std::string const& tokenToParse) const;
86
87 MCNAPI void _populateResponse(::WebServices::EduSignin::SigninResponse const& response);
88
89 MCNAPI void _signInCanceled();
90
91 MCNAPI void _updateData(
93 bool isRefresh
94 );
95
96 MCNAPI void _updateGraphData(
98 bool isRefresh
99 );
100
101 MCNAPI void getIdentity();
102
103 MCNAPI void resetAuthenticationState();
104
105 MCNAPI void signOut(::std::function<void(::Identity::SignOutResult)> callback) const;
106
107 MCNAPI void tick();
108#endif
109 // NOLINTEND
110
111public:
112 // static variables
113 // NOLINTBEGIN
114 MCNAPI static ::std::string const& IS_VALID_FIELD();
115
116 MCNAPI static ::std::string const& JWT_EXPIRATION_FIELD();
117
118 MCNAPI static ::std::string const& JWT_REQUEST_ID_FIELD();
119
120 MCNAPI static ::std::string const& PAYLOAD_FIELD();
121
122 MCNAPI static ::std::string const& PUBLIC_KEY();
123
124 MCNAPI static ::std::string const& REQUEST_ID_FIELD();
125
126 MCNAPI static ::std::string const& RESPONSE_FIELD();
127
128 MCNAPI static ::std::string& mCachedServiceEndpoint();
129 // NOLINTEND
130
131public:
132 // constructor thunks
133 // NOLINTBEGIN
134#ifdef LL_PLAT_C
135 MCNAPI void* $ctor(
136 ::Bedrock::NotNullNonOwnerPtr<::IEDUSystems> eduSystems,
138 );
139#endif
140 // NOLINTEND
141};
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()
Definition EnableNonOwnerReferences.h:7
Definition Result.h:9
Definition EnableQueueForMainThread.h:10
Definition IEDUSystems.h:14
Definition IEduAuth.h:20
Definition AccessTokenInfo.h:5
Definition ActiveDirectoryIdentityParameters.h:7
Definition AuthError.h:7
Definition AuthToken.h:7
Definition EduAuthParameters.h:7
Definition ServiceResponse.h:7
Definition SignOutResult.h:7
Definition SigninResponse.h:7
Definition Alias.h:14