Skip to content

Commit f2f85a1

Browse files
committed
feat: Rename AuthenticationLevelChangeType to LoginChangeKind
1 parent 9bb5f85 commit f2f85a1

File tree

6 files changed

+27
-14
lines changed

6 files changed

+27
-14
lines changed

Assets/Scripts/StandardSamples/Services/AchievementsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private static string ProductUserIdToString(ProductUserId productUserId)
107107
return buffer;
108108
}
109109

110-
protected async override void OnLoggedIn(AuthenticationListener.AuthenticationLevelChangeType changeType)
110+
protected async override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
111111
{
112112
await RefreshAsync();
113113
}

Assets/Scripts/StandardSamples/Services/EOSService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected bool TryGetProductUserId(out ProductUserId productUserId)
159159

160160
}
161161

162-
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.AuthenticationLevelChangeType changeType)
162+
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.LoginChangeKind changeType)
163163
{
164164
if (authenticated)
165165
{
@@ -176,15 +176,15 @@ private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.
176176
/// By default, there is no action taken.
177177
/// </summary>
178178
/// <param name="changeType">The type of authentication change.</param>
179-
protected virtual void OnLoggedIn(AuthenticationListener.AuthenticationLevelChangeType changeType) { }
179+
protected virtual void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType) { }
180180

181181
/// <summary>
182182
/// If there are tasks that need to be done when logged out, consider
183183
/// overriding the Reset() function as that is where such things should
184184
/// be done.
185185
/// </summary>
186186
/// <param name="changeType">The type of authentication change.</param>
187-
protected void OnLoggedOut(AuthenticationListener.AuthenticationLevelChangeType changeType)
187+
protected void OnLoggedOut(AuthenticationListener.LoginChangeKind changeType)
188188
{
189189
Reset();
190190
}

Assets/Scripts/StandardSamples/Services/PlayerDataStorageService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ private void FinishFileUpload(string fileName, Action fileUploadCallback = null)
372372
/// <list type="bullet">
373373
/// <item><description><c>QueryFileList()</c></description></item>
374374
/// </list>
375-
protected override void OnLoggedIn(AuthenticationListener.AuthenticationLevelChangeType changeType)
375+
protected override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
376376
{
377-
if (changeType == AuthenticationListener.AuthenticationLevelChangeType.Connect)
377+
if (changeType == AuthenticationListener.LoginChangeKind.Connect)
378378
{
379379
QueryFileList();
380380
}

Assets/Scripts/StandardSamples/Services/StatsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private static void Log(string toPrint)
9494
UnityEngine.Debug.Log(toPrint);
9595
}
9696

97-
protected async override void OnLoggedIn(AuthenticationListener.AuthenticationLevelChangeType changeType)
97+
protected async override void OnLoggedIn(AuthenticationListener.LoginChangeKind changeType)
9898
{
9999
if (TryGetProductUserId(out ProductUserId userId))
100100
{

Assets/Scripts/StandardSamples/UI/Common/SampleMenu.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ protected SampleMenu(bool startsHidden = true, bool requiresAuthentication = tru
164164
/// </param>
165165
/// <param name="authenticationChangeType">
166166
/// What kind of authentication change this is.</param>
167-
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.AuthenticationLevelChangeType authenticationChangeType)
167+
private void OnAuthenticationChanged(bool authenticated, AuthenticationListener.LoginChangeKind authenticationChangeType)
168168
{
169169
if (authenticated || !RequiresAuthentication)
170170
{

com.playeveryware.eos/Runtime/Core/AuthenticationListener.cs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,22 @@ public class AuthenticationListener: IAuthInterfaceEventListener, IConnectInterf
3737
/// <summary>
3838
/// Identifies the kind of authentication change.
3939
/// </summary>
40-
public enum AuthenticationLevelChangeType
40+
public enum LoginChangeKind
4141
{
42+
/// <summary>
43+
/// Represents a login change relating to the Auth-login type with EOS.
44+
/// A user logged in with the Auth Interface has access to Epic
45+
/// Account Services (EAS) operations.
46+
/// </summary>
4247
Auth,
48+
49+
/// <summary>
50+
/// Represents a login change relating to the Connect-login type with EOS.
51+
/// A user logged in with the Connect Interface has access to all
52+
/// EOS Game Services.
53+
/// Typically a user will be logged in to Auth and then afterwards
54+
/// logged in to Connect.
55+
/// </summary>
4356
Connect
4457
}
4558

@@ -51,7 +64,7 @@ public enum AuthenticationLevelChangeType
5164
/// True if the authentication state has changed to authenticated, False
5265
/// otherwise.
5366
/// </param>
54-
public delegate void AuthenticationChangedEventHandler(bool authenticated, AuthenticationLevelChangeType changeType);
67+
public delegate void AuthenticationChangedEventHandler(bool authenticated, LoginChangeKind changeType);
5568

5669
/// <summary>
5770
/// Event that triggers when the state of authentication has changed.
@@ -114,7 +127,7 @@ public bool IsAuthenticated
114127
/// <param name="attemptedState"></param>
115128
/// <param name="attemptResult"></param>
116129
/// <param name="changeType">The type of authentication change.</param>
117-
private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attemptResult, AuthenticationLevelChangeType changeType)
130+
private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attemptResult, LoginChangeKind changeType)
118131
{
119132
// If the attempt to change the state of authentication did not
120133
// succeed, then log a warning and stop.
@@ -140,7 +153,7 @@ private void TriggerAuthenticationChangedEvent(bool attemptedState, Result attem
140153
/// </param>
141154
public void OnAuthLogin(LoginCallbackInfo loginCallbackInfo)
142155
{
143-
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, AuthenticationLevelChangeType.Auth);
156+
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, LoginChangeKind.Auth);
144157
}
145158

146159
/// <summary>
@@ -151,7 +164,7 @@ public void OnAuthLogin(LoginCallbackInfo loginCallbackInfo)
151164
/// </param>
152165
public void OnAuthLogout(LogoutCallbackInfo logoutCallbackInfo)
153166
{
154-
TriggerAuthenticationChangedEvent(false, logoutCallbackInfo.ResultCode, AuthenticationLevelChangeType.Auth);
167+
TriggerAuthenticationChangedEvent(false, logoutCallbackInfo.ResultCode, LoginChangeKind.Auth);
155168
}
156169

157170
/// <summary>
@@ -162,7 +175,7 @@ public void OnAuthLogout(LogoutCallbackInfo logoutCallbackInfo)
162175
/// </param>
163176
public void OnConnectLogin(Epic.OnlineServices.Connect.LoginCallbackInfo loginCallbackInfo)
164177
{
165-
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, AuthenticationLevelChangeType.Connect);
178+
TriggerAuthenticationChangedEvent(true, loginCallbackInfo.ResultCode, LoginChangeKind.Connect);
166179
}
167180

168181
/// <summary>

0 commit comments

Comments
 (0)