Merge pull request #25 from lotodore/change_type_to_authtype

Rename Login parameter "Type" to "AuthType".

Not a relevant change, it predates EOS, but will merge for clarity
This commit is contained in:
Joshua (MordenTral) Statzer
2022-03-07 08:20:21 -05:00
committed by Joshua
parent 2e43a65acd
commit 9784cd2f01
2 changed files with 8 additions and 8 deletions

View File

@@ -21,8 +21,8 @@ class ULoginUserCallbackProxy : public UOnlineBlueprintCallProxyBase
FEmptyOnlineDelegate OnFailure; FEmptyOnlineDelegate OnFailure;
// Logs into the identity interface // Logs into the identity interface
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject", AdvancedDisplay = "Type"), Category = "Online|AdvancedIdentity") UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject", AdvancedDisplay = "AuthType"), Category = "Online|AdvancedIdentity")
static ULoginUserCallbackProxy* LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString Type); static ULoginUserCallbackProxy* LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString AuthType);
// UOnlineBlueprintCallProxyBase interface // UOnlineBlueprintCallProxyBase interface
virtual void Activate() override; virtual void Activate() override;
@@ -42,7 +42,7 @@ private:
// The user pass / token // The user pass / token
FString UserToken; FString UserToken;
FString Type; FString AuthType;
// The delegate executed by the online subsystem // The delegate executed by the online subsystem
FOnLoginCompleteDelegate Delegate; FOnLoginCompleteDelegate Delegate;

View File

@@ -12,13 +12,13 @@ ULoginUserCallbackProxy::ULoginUserCallbackProxy(const FObjectInitializer& Objec
{ {
} }
ULoginUserCallbackProxy* ULoginUserCallbackProxy::LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString Type) ULoginUserCallbackProxy* ULoginUserCallbackProxy::LoginUser(UObject* WorldContextObject, class APlayerController* PlayerController, FString UserID, FString UserToken, FString AuthType)
{ {
ULoginUserCallbackProxy* Proxy = NewObject<ULoginUserCallbackProxy>(); ULoginUserCallbackProxy* Proxy = NewObject<ULoginUserCallbackProxy>();
Proxy->PlayerControllerWeakPtr = PlayerController; Proxy->PlayerControllerWeakPtr = PlayerController;
Proxy->UserID = UserID; Proxy->UserID = UserID;
Proxy->UserToken = UserToken; Proxy->UserToken = UserToken;
Proxy->Type = Type; Proxy->AuthType = AuthType;
Proxy->WorldContextObject = WorldContextObject; Proxy->WorldContextObject = WorldContextObject;
return Proxy; return Proxy;
} }
@@ -45,12 +45,12 @@ void ULoginUserCallbackProxy::Activate()
if (Identity.IsValid()) if (Identity.IsValid())
{ {
// Fallback to default AuthType if nothing is specified // Fallback to default AuthType if nothing is specified
if (Type.IsEmpty()) if (AuthType.IsEmpty())
{ {
Type = Identity->GetAuthType(); AuthType = Identity->GetAuthType();
} }
DelegateHandle = Identity->AddOnLoginCompleteDelegate_Handle(Player->GetControllerId(), Delegate); DelegateHandle = Identity->AddOnLoginCompleteDelegate_Handle(Player->GetControllerId(), Delegate);
FOnlineAccountCredentials AccountCreds(Type, UserID, UserToken); FOnlineAccountCredentials AccountCreds(AuthType, UserID, UserToken);
Identity->Login(Player->GetControllerId(), AccountCreds); Identity->Login(Player->GetControllerId(), AccountCreds);
return; return;
} }