LeviLamina
Loading...
Searching...
No Matches
IEduAuth.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/network/services/CachedAsync.h"
8#include "mc/platform/Result.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Identity { struct AuthArgs; }
13namespace Identity { struct AuthError; }
14namespace Identity { struct AuthToken; }
15namespace Identity { struct EduAuthTokenPair; }
16namespace Identity { struct SignOutResult; }
17// clang-format on
18
19namespace Identity {
20
21class IEduAuth : public ::Bedrock::EnableNonOwnerReferences {
22public:
23 // member variables
24 // NOLINTBEGIN
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 IEduAuth& operator=(IEduAuth const&);
35 IEduAuth(IEduAuth const&);
36 IEduAuth();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~IEduAuth() /*override*/ = default;
42
43 virtual void Authenticate(
45 ::std::function<void()>,
46 ::std::function<void(::std::optional<::Bedrock::Result<::Identity::AuthToken, ::Identity::AuthError>>)>
47 ) = 0;
48
49 virtual void resetAuthenticationState() = 0;
50
51 virtual void clearCookies() = 0;
52
53 virtual void signOut(::std::string_view, ::std::function<void(::Identity::SignOutResult)>) = 0;
54
55 virtual void authenticateSilently(
56 ::std::string_view,
57 ::std::string const&,
59 ) = 0;
60
61 virtual void authenticateSilentlyCredentialed();
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67#ifdef LL_PLAT_C
68 MCNAPI ::Bedrock::Threading::CachedAsync<::std::optional<::std::string>> getEduToken() const;
69#endif
70
71 MCNAPI ::Identity::EduAuthTokenPair getTokens() const;
72
73 MCNAPI bool hasValidMessToken() const;
74
75#ifdef LL_PLAT_C
76 MCNAPI void resetEduToken();
77
78 MCNAPI void setEduToken(::std::string const& eduToken);
79
80 MCNAPI void setTokens(::Identity::EduAuthTokenPair tokens);
81#endif
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87
88 // NOLINTEND
89};
90
91} // namespace Identity
Definition EnableNonOwnerReferences.h:7
Definition Result.h:9
MCAPI bool hasValidMessToken() const
MCAPI::Identity::EduAuthTokenPair getTokens() const
Definition AuthArgs.h:7
Definition AuthError.h:7
Definition AuthToken.h:7
Definition EduAuthTokenPair.h:7
Definition SignOutResult.h:7
Definition Alias.h:14