Loading...
Searching...
No Matches
FOnlineIdentityAccelByte Class Reference

#include <OnlineIdentityInterfaceAccelByte.h>

Inheritance diagram for FOnlineIdentityAccelByte:

Public Member Functions

 FOnlineIdentityAccelByte (FOnlineSubsystemAccelByte *InSubsystem)
virtual bool Login (int32 LocalUserNum, const FOnlineAccountCredentialsAccelByte &AccountCredentials)
virtual bool Login (int32 LocalUserNum, const FOnlineAccountCredentials &AccountCredentials) override
virtual bool Logout (int32 LocalUserNum) override
virtual bool AutoLogin (int32 LocalUserNum) override
virtual TSharedPtr< FUserOnlineAccount > GetUserAccount (const FUniqueNetId &UserId) const override
virtual TArray< TSharedPtr< FUserOnlineAccount > > GetAllUserAccounts () const override
virtual FUniqueNetIdPtr GetUniquePlayerId (int32 LocalUserNum) const override
virtual FUniqueNetIdPtr CreateUniquePlayerId (uint8 *Bytes, int32 Size) override
virtual FUniqueNetIdPtr CreateUniquePlayerId (const FString &Str) override
virtual ELoginStatus::Type GetLoginStatus (int32 LocalUserNum) const override
virtual ELoginStatus::Type GetLoginStatus (const FUniqueNetId &UserId) const override
virtual FString GetPlayerNickname (int32 LocalUserNum) const override
virtual FString GetPlayerNickname (const FUniqueNetId &UserId) const override
virtual FString GetAuthToken (int32 LocalUserNum) const override
virtual void RevokeAuthToken (const FUniqueNetId &UserId, const FOnRevokeAuthTokenCompleteDelegate &Delegate) override
virtual void GetLinkedAccountAuthToken (int32 LocalUserNum, const FOnGetLinkedAccountAuthTokenCompleteDelegate &Delegate) const override
virtual void GetUserPrivilege (const FUniqueNetId &UserId, EUserPrivileges::Type Privilege, const FOnGetUserPrivilegeCompleteDelegate &Delegate) override
virtual FPlatformUserId GetPlatformUserIdFromUniqueNetId (const FUniqueNetId &UniqueNetId) const override
virtual FString GetAuthType () const override
bool GetLocalUserNum (const FUniqueNetId &NetId, int32 &OutLocalUserNum) const
bool GetLocalUserNumFromPlatformUserId (const FString &PlatformUserId, int32 &OutLocalUserNum)
bool Logout (int32 LocalUserNum, FString Reason)
AccelByte::FApiClientPtr GetApiClient (const FUniqueNetId &UserId)
AccelByte::FApiClientPtr GetApiClient (int32 LocalUserNum)
bool AuthenticateAccelByteServer (const FOnAuthenticateServerComplete &Delegate, int32 LocalUserNum=0)
bool IsServerAuthenticated (int32 LocalUserNum=0)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnConnectLobbyComplete, bool, const FUniqueNetId &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnLoginWithOAuthErrorComplete, bool, const FUniqueNetId &, const FErrorOAuthInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLoginComplete, bool, const FUniqueNetId &, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnSimultaneousLoginComplete, bool, ESimultaneousLoginResult, const FUniqueNetId &, const FErrorOAuthInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLogoutComplete, bool, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnConnectLobbyComplete, bool, const FUniqueNetId &, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLobbyConnectionClosed, const FUniqueNetId &, int32, const FString &, bool)
 DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLobbyReconnecting, const FUniqueNetId &, int32, const FString &, bool)
 DEFINE_ONLINE_PLAYER_DELEGATE (MAX_LOCAL_PLAYERS, AccelByteOnLobbyReconnected)
 DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLobbyReconnectAttempted, const AccelByte::FReconnectAttemptInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLobbyMassiveOutageEvent, const AccelByte::FMassiveOutageInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnPlatformTokenRefreshedComplete, bool, const FPlatformTokenRefreshResponse &, const FName &, const FErrorOAuthInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLoginQueued, const FAccelByteModelsLoginQueueTicketInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLoginQueueCancelComplete, bool, const FOnlineErrorAccelByte &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnLoginQueueClaimTicketComplete, bool, const FErrorOAuthInfo &)
bool ConnectAccelByteLobby (int32 LocalUserNum)
void SetAutoLoginCreateHeadless (bool bInIsAutoLoginCreateHeadless)
void GenerateCodeForPublisherToken (int32 LocalUserNum, const FString &PublisherClientId, FGenerateCodeForPublisherTokenComplete Delegate)
 This function generate ab code that can be exchanged into publisher namespace token (i.e. by web portal).
bool RefreshPlatformToken (int32 LocalUserNum)
 Refresh the native platform token that is stored in the backend. Therefore we can prevent expiration on the backend. Default behavior: this function already registered automatically and follow the schedule of refresh token expiration. To disable this default:
bool RefreshPlatformToken (int32 LocalUserNum, FName SubsystemName)
 Refresh the native platform token that is stored in the backend. Therefore we can prevent expiration on the backend.
bool CancelLoginQueue (int32 LocalUserNum)
bool ClaimLoginQueueTicket (int32 LocalUserNum)
void SetLoginStatus (int32 LocalUserNum, ELoginStatus::Type NewStatus)
void AddAuthenticatedServer (int32 LocalUserNum)
void FinalizeLoginQueueCancel (int32 LoginUserNum)
void InitializeLoginQueue (int32 LoginUserNum, const FString &TicketId)
void FinalizeLoginQueue (int32 LoginUserNum)
virtual TSharedPtr< FUserOnlineAccount > GetUserAccount (int LocalUserNum) const
 Retrieve User Account information from given Local User.
virtual TSharedPtr< FUserOnlineAccount > GetUserAccount (const FUniqueNetIdRef &LocalUserId) const
 Retrieve User Account information from given Local User.
virtual TSharedPtr< FUserOnlineAccount > GetUserAccount (const FUniqueNetIdPtr &LocalUserId) const
 Retrieve User Account information from given Local User.
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (AccelByteOnLoginQueueCanceledByUser, int32)
bool VerifyLoginMfa (int32 LocalUserNum, EAccelByteLoginAuthFactorType FactorType, const FString &Code, const FString &MfaToken, bool bRememberDevice=false)
 Verify user using multifactor authentication. Add handler to AccelByteOnLoginCompleteDelegate for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnUpdatePasswordComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool UpdatePassword (int32 LocalUserNum, const FUpdatePasswordRequest &Request, EAccelByteLoginAuthFactorType FactorType=EAccelByteLoginAuthFactorType::None, const FString &Code=TEXT(""))
 Update user password. Add handler to AccelByteOnUpdatePasswordComplete for the result.
bool UpdatePassword (const FUniqueNetId &UserId, const FUpdatePasswordRequest &Request, EAccelByteLoginAuthFactorType FactorType=EAccelByteLoginAuthFactorType::None, const FString &Code=TEXT(""))
 Update user password. Add handler to AccelByteOnUpdatePasswordComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnGetMfaStatusComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &, const FMfaStatusResponse &)
bool GetMfaStatus (int32 LocalUserNum)
 Get multifactor authentication status for the user. Add handler to AccelByteOnGetMfaStatusComplete for the result.
bool GetMfaStatus (const FUniqueNetId &UserId)
 Get multifactor authentication status for the user. Add handler to AccelByteOnGetMfaStatusComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnEnableMfaBackupCodesComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool EnableMfaBackupCodes (int32 LocalUserNum)
 Enable multifactor authentication using backup codes. Add handler to AccelByteOnEnableMfaBackupCodesComplete for the result.
bool EnableMfaBackupCodes (const FUniqueNetId &UserId)
 Enable multifactor authentication using backup codes. Add handler to AccelByteOnEnableMfaBackupCodesComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnDisableMfaBackupCodesComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool DisableMfaBackupCodes (int32 LocalUserNum, const FString &Code)
 Disable multifactor authentication backup codes. Add handler to AccelByteOnDisableMfaBackupCodesComplete for the result.
bool DisableMfaBackupCodes (const FUniqueNetId &UserId, const FString &Code)
 Disable multifactor authentication backup codes. Add handler to AccelByteOnDisableMfaBackupCodesComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnGenerateMfaBackupCodesComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &, const FUser2FaBackupCode &)
bool GenerateMfaBackupCode (int32 LocalUserNum)
 Generate multifactor authentication backup codes. Add handler to AccelByteOnGenerateMfaBackupCodesComplete for the result.
bool GenerateMfaBackupCode (const FUniqueNetId &UserId)
 Generate multifactor authentication backup codes. Add handler to AccelByteOnGenerateMfaBackupCodesComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnEnableMfaAuthenticatorComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool EnableMfaAuthenticator (int32 LocalUserNum, const FString &Code)
 Enable multifactor authentication using authenticator app. Add handler to AccelByteOnEnableMfaAuthenticatorComplete for the result.
bool EnableMfaAuthenticator (const FUniqueNetId &UserId, const FString &Code)
 Enable multifactor authentication using authenticator app. Add handler to AccelByteOnEnableMfaAuthenticatorComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnDisableMfaAuthenticatorComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool DisableMfaAuthenticator (int32 LocalUserNum, const FString &Code)
 Disable multifactor authentication using authenticator app. Add handler to AccelByteOnDisableMfaAuthenticatorComplete for the result.
bool DisableMfaAuthenticator (const FUniqueNetId &UserId, const FString &Code)
 Disable multifactor authentication using authenticator app. Add handler to AccelByteOnDisableMfaAuthenticatorComplete for the result.
bool GenerateMfaAuthenticatorSecretKey (int32 LocalUserNum)
 Generate multifactor authentication secret key for authenticator app. Add handler to AccelByteOnGenerateMfaAuthenticatorSecretKeyComplete for the result.
bool GenerateMfaAuthenticatorSecretKey (const FUniqueNetId &UserId)
 Generate multifactor authentication secret key for authenticator app. Add handler to AccelByteOnGenerateMfaAuthenticatorSecretKeyComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnEnableMfaEmailComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool EnableMfaEmail (int32 LocalUserNum, const FString &Code)
 Enable multifactor authentication using email. Add handler to AccelByteOnEnableMfaEmailComplete for the result.
bool EnableMfaEmail (const FUniqueNetId &UserId, const FString &Code)
 Enable multifactor authentication using email. Add handler to AccelByteOnEnableMfaEmailComplete for the result.
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnDisableMfaEmailComplete, const FUniqueNetId &, const FOnlineErrorAccelByte &)
bool DisableMfaEmail (int32 LocalUserNum, const FString &Code)
 Disable multifactor authentication using email. Add handler to AccelByteOnDisableMfaEmailComplete for the result.
bool DisableMfaEmail (const FUniqueNetId &UserId, const FString &Code)
 Disable multifactor authentication using email. Add handler to AccelByteOnDisableMfaEmailComplete for the result.
bool SendMfaCodeToEmail (int32 LocalUserNum, const EAccelByteSendMfaEmailAction Action)
 Send multifactor authentication code to user email. Add handler to AccelByteOnSendMfaCodeToEmailComplete for the result.
bool SendMfaCodeToEmail (const FUniqueNetId &UserId, const EAccelByteSendMfaEmailAction Action)
 Send multifactor authentication code to user email. Add handler to AccelByteOnSendMfaCodeToEmailComplete for the result.

Static Public Member Functions

static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineIdentityAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromWorld (const UWorld *World, TSharedPtr< FOnlineIdentityAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool IsLogoutRequired (int32 WsClosedConnectionStatusCode)

Public Attributes

PACKAGE_SCOPE : void AddNewAuthenticatedUser(int32 LocalUserNum
PACKAGE_SCOPE const TSharedRef< const FUniqueNetId > & UserId
PACKAGE_SCOPE const TSharedRef< const FUniqueNetId > const TSharedRef< FUserOnlineAccount > & Account

Detailed Description

AccelByte service implementation of the online identity interface

Constructor & Destructor Documentation

◆ FOnlineIdentityAccelByte()

FOnlineIdentityAccelByte::FOnlineIdentityAccelByte ( FOnlineSubsystemAccelByte * InSubsystem)

Construct an instance of our identity interface

Parameters
InSubsystemSubsystem that owns this identity interface

Begin FOnlineIdentityAccelByte

Member Function Documentation

◆ AddAuthenticatedServer()

void FOnlineIdentityAccelByte::AddAuthenticatedServer ( int32 LocalUserNum)

Add a new authenticated server to the identity interface mappings for V2 session flow

◆ AuthenticateAccelByteServer()

bool FOnlineIdentityAccelByte::AuthenticateAccelByteServer ( const FOnAuthenticateServerComplete & Delegate,
int32 LocalUserNum = 0 )

Authenticate a server on the backend

#TODO (Maxwell): This really should be supported by AutoLogin as a separate authentication path, as there's a ton of hacky code we need to write to make sure that any server call is working when authenticated. If we use AutoLogin for server auth, we bypass a lot of that code. However, this would require a rework to the current server code that we don't have time for... For now, use this method for all server auth...

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM()

FOnlineIdentityAccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( AccelByteOnLoginQueueCanceledByUser ,
int32  )

Online delegate to notify poller when a user cancelled login queue

◆ DEFINE_ONLINE_PLAYER_DELEGATE()

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE ( MAX_LOCAL_PLAYERS ,
AccelByteOnLobbyReconnected  )

Called when lobby connected after try to reconnect

◆ DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM() [1/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLobbyConnectionClosed ,
const FUniqueNetId & ,
int32 ,
const FString & ,
bool  )

Called when lobby connection closed

Parameters
LocalUserNumthe controller number of the associated user
UserIdthe user id received from the server on successful connect
StatusCodeCurrent status response code from lobby closed connection
ReasonThe reason of lobby connection closed
bWasCleanWhether the connection closed with a clean status or not

◆ DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM() [2/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLobbyReconnecting ,
const FUniqueNetId & ,
int32 ,
const FString & ,
bool  )

Called when lobby try to reconnect

Parameters
LocalUserNumthe controller number of the associated user
UserIdthe user id received from the server on successful connect
StatusCodeCurrent status response code from lobby closed connection
ReasonThe reason of lobby reconnecting
bWasCleanWhether the connection reconnect with a clean status or not

◆ DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM() [3/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnPlatformTokenRefreshedComplete ,
bool ,
const FPlatformTokenRefreshResponse & ,
const FName & ,
const FErrorOAuthInfo &  )

Triggered when the platform token refresh is already responded

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
FPlatformTokenRefreshResponsethe refresh result & information
PlatformNameThe platform that was refreshed
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM() [4/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnSimultaneousLoginComplete ,
bool ,
ESimultaneousLoginResult ,
const FUniqueNetId & ,
const FErrorOAuthInfo &  )

Called when user simultaneous login has completed after calling Login()

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
ESimultaneousLoginResultthe result from the login attempt, or the last known state
UserIdthe user id received from the server on successful login
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM() [1/3]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLobbyMassiveOutageEvent ,
const AccelByte::FMassiveOutageInfo &  )

Called when the lobby has been disconnected for longer than usual and can't be reconnected yet

◆ DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM() [2/3]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLobbyReconnectAttempted ,
const AccelByte::FReconnectAttemptInfo &  )

Called when the disconnected lobby websocket trying to establish the connection again

◆ DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM() [3/3]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLoginQueued ,
const FAccelByteModelsLoginQueueTicketInfo &  )

Triggered when the login process is queued

Parameters
LocalUserNumthe controller number of the associated user
TicketInfoInformation about the queue ticket

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [1/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnConnectLobbyComplete ,
bool ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Called when user account login succesfully connected to lobby

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
UserIdthe user id received from the server on successful connect
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [2/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnGenerateMfaBackupCodesComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte & ,
const FUser2FaBackupCode &  )

Online delegate to notify user when generate mfa backup code completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [3/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnGetMfaStatusComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte & ,
const FMfaStatusResponse &  )

Online delegate to notify user when get mfa status completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [4/4]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLoginComplete ,
bool ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Called when user account login has completed after calling Login() or AutoLogin()

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
UserIdthe user id received from the server on successful login
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [1/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnDisableMfaAuthenticatorComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when disable mfa authenticator completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [2/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnDisableMfaBackupCodesComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when disable mfa backup code completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [3/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnDisableMfaEmailComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when disable mfa email completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [4/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnEnableMfaAuthenticatorComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when enable mfa authenticator completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [5/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnEnableMfaBackupCodesComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when enable mfa backup code completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [6/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnEnableMfaEmailComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when enable mfa email completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [7/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLoginQueueCancelComplete ,
bool ,
const FOnlineErrorAccelByte &  )

Triggered when login queue cancel operation is completed

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [8/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLoginQueueClaimTicketComplete ,
bool ,
const FErrorOAuthInfo &  )

Triggered when the login process is queued

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
TicketInfoInformation about the queue ticket
ErrorInformation about the error condition Triggered when the login process is queued
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
TicketInfoInformation about the queue ticket
ErrorInformation about the error condition Triggered when the login process is queued
LocalUserNumthe controller number of the associated user
bWasSuccessfultrue if server was contacted and a valid result received
TicketInfoInformation about the queue ticket
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [9/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnLogoutComplete ,
bool ,
const FOnlineErrorAccelByte &  )

Delegate used in notifying the that manual logout completed

Parameters
LocalUserNumthe controller number of the associated user
bWasSuccessfulwhether the async call completed properly or not
ErrorInformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM() [10/10]

FOnlineIdentityAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnUpdatePasswordComplete ,
const FUniqueNetId & ,
const FOnlineErrorAccelByte &  )

Online delegate to notify user when password updated.

◆ DisableMfaAuthenticator() [1/2]

bool FOnlineIdentityAccelByte::DisableMfaAuthenticator ( const FUniqueNetId & UserId,
const FString & Code )

Disable multifactor authentication using authenticator app. Add handler to AccelByteOnDisableMfaAuthenticatorComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
CodeThe code generated from authenticator app.
Returns
true if the task dispatched.

◆ DisableMfaAuthenticator() [2/2]

bool FOnlineIdentityAccelByte::DisableMfaAuthenticator ( int32 LocalUserNum,
const FString & Code )

Disable multifactor authentication using authenticator app. Add handler to AccelByteOnDisableMfaAuthenticatorComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
CodeThe code generated from authenticator app.
Returns
true if the task dispatched.

◆ DisableMfaBackupCodes() [1/2]

bool FOnlineIdentityAccelByte::DisableMfaBackupCodes ( const FUniqueNetId & UserId,
const FString & Code )

Disable multifactor authentication backup codes. Add handler to AccelByteOnDisableMfaBackupCodesComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
CodeOne of the valid backup codes.
Returns
true if the task dispatched.

◆ DisableMfaBackupCodes() [2/2]

bool FOnlineIdentityAccelByte::DisableMfaBackupCodes ( int32 LocalUserNum,
const FString & Code )

Disable multifactor authentication backup codes. Add handler to AccelByteOnDisableMfaBackupCodesComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
CodeOne of the valid backup codes.
Returns
true if the task dispatched.

◆ DisableMfaEmail() [1/2]

bool FOnlineIdentityAccelByte::DisableMfaEmail ( const FUniqueNetId & UserId,
const FString & Code )

Disable multifactor authentication using email. Add handler to AccelByteOnDisableMfaEmailComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
CodeThe verification code from user email.
Returns
true if the task dispatched.

◆ DisableMfaEmail() [2/2]

bool FOnlineIdentityAccelByte::DisableMfaEmail ( int32 LocalUserNum,
const FString & Code )

Disable multifactor authentication using email. Add handler to AccelByteOnDisableMfaEmailComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
CodeThe verification code from user email.
Returns
true if the task dispatched.

◆ EnableMfaAuthenticator() [1/2]

bool FOnlineIdentityAccelByte::EnableMfaAuthenticator ( const FUniqueNetId & UserId,
const FString & Code )

Enable multifactor authentication using authenticator app. Add handler to AccelByteOnEnableMfaAuthenticatorComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
CodeThe code generated from authenticator app.
Returns
true if the task dispatched.

◆ EnableMfaAuthenticator() [2/2]

bool FOnlineIdentityAccelByte::EnableMfaAuthenticator ( int32 LocalUserNum,
const FString & Code )

Enable multifactor authentication using authenticator app. Add handler to AccelByteOnEnableMfaAuthenticatorComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
true if the task dispatched.

◆ EnableMfaBackupCodes() [1/2]

bool FOnlineIdentityAccelByte::EnableMfaBackupCodes ( const FUniqueNetId & UserId)

Enable multifactor authentication using backup codes. Add handler to AccelByteOnEnableMfaBackupCodesComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
Returns
true if the task dispatched.

◆ EnableMfaBackupCodes() [2/2]

bool FOnlineIdentityAccelByte::EnableMfaBackupCodes ( int32 LocalUserNum)

Enable multifactor authentication using backup codes. Add handler to AccelByteOnEnableMfaBackupCodesComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
true if the task dispatched.

◆ EnableMfaEmail() [1/2]

bool FOnlineIdentityAccelByte::EnableMfaEmail ( const FUniqueNetId & UserId,
const FString & Code )

Enable multifactor authentication using email. Add handler to AccelByteOnEnableMfaEmailComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
CodeThe verification code from user email.
Returns
true if the task dispatched.

◆ EnableMfaEmail() [2/2]

bool FOnlineIdentityAccelByte::EnableMfaEmail ( int32 LocalUserNum,
const FString & Code )

Enable multifactor authentication using email. Add handler to AccelByteOnEnableMfaEmailComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
CodeThe verification code from user email.
Returns
true if the task dispatched.

◆ FinalizeLoginQueue()

void FOnlineIdentityAccelByte::FinalizeLoginQueue ( int32 LoginUserNum)

Used to clear ticket ID according to it's user num.

Parameters
LoginUserNumUserNum trying to login

◆ FinalizeLoginQueueCancel()

void FOnlineIdentityAccelByte::FinalizeLoginQueueCancel ( int32 LoginUserNum)

Used by login queue cancel to notify poller when user cancelled login queue

Parameters
LoginUserNumthe user num we cancelled the login

◆ GenerateCodeForPublisherToken()

void FOnlineIdentityAccelByte::GenerateCodeForPublisherToken ( int32 LocalUserNum,
const FString & PublisherClientId,
FGenerateCodeForPublisherTokenComplete Delegate )

This function generate ab code that can be exchanged into publisher namespace token (i.e. by web portal).

Parameters
PublisherClientIDThe targeted game's publisher ClientID.

◆ GenerateMfaAuthenticatorSecretKey() [1/2]

bool FOnlineIdentityAccelByte::GenerateMfaAuthenticatorSecretKey ( const FUniqueNetId & UserId)

Generate multifactor authentication secret key for authenticator app. Add handler to AccelByteOnGenerateMfaAuthenticatorSecretKeyComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
Returns
true if the task dispatched.

◆ GenerateMfaAuthenticatorSecretKey() [2/2]

bool FOnlineIdentityAccelByte::GenerateMfaAuthenticatorSecretKey ( int32 LocalUserNum)

Generate multifactor authentication secret key for authenticator app. Add handler to AccelByteOnGenerateMfaAuthenticatorSecretKeyComplete for the result.

Online delegate to notify user when generate mfa authenticator secret key completed.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
true if the task dispatched.

◆ GenerateMfaBackupCode() [1/2]

bool FOnlineIdentityAccelByte::GenerateMfaBackupCode ( const FUniqueNetId & UserId)

Generate multifactor authentication backup codes. Add handler to AccelByteOnGenerateMfaBackupCodesComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
Returns
true if the task dispatched.

◆ GenerateMfaBackupCode() [2/2]

bool FOnlineIdentityAccelByte::GenerateMfaBackupCode ( int32 LocalUserNum)

Generate multifactor authentication backup codes. Add handler to AccelByteOnGenerateMfaBackupCodesComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
true if the task dispatched.

◆ GetApiClient() [1/2]

AccelByte::FApiClientPtr FOnlineIdentityAccelByte::GetApiClient ( const FUniqueNetId & UserId)

Get the FApiClient that is used for a particular user by their net ID.

Used to make raw SDK calls for user if needed.

◆ GetApiClient() [2/2]

AccelByte::FApiClientPtr FOnlineIdentityAccelByte::GetApiClient ( int32 LocalUserNum)

Get the FApiClient that is used for a particular user by their net ID.

Used to make raw SDK calls for user if needed.

◆ GetFromSubsystem()

bool FOnlineIdentityAccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineIdentityAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem passed in.

Parameters
SubsystemSubsystem instance that we wish to get this interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetFromWorld()

bool FOnlineIdentityAccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineIdentityAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem associated with the world passed in.

Parameters
WorldWorld instance that we wish to get the interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetLocalUserNum()

bool FOnlineIdentityAccelByte::GetLocalUserNum ( const FUniqueNetId & NetId,
int32 & OutLocalUserNum ) const

Extra method to try and get a LocalUserNum from a FUniqueNetId instance

◆ GetMfaStatus() [1/2]

bool FOnlineIdentityAccelByte::GetMfaStatus ( const FUniqueNetId & UserId)

Get multifactor authentication status for the user. Add handler to AccelByteOnGetMfaStatusComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
Returns
true if the task dispatched.

◆ GetMfaStatus() [2/2]

bool FOnlineIdentityAccelByte::GetMfaStatus ( int32 LocalUserNum)

Get multifactor authentication status for the user. Add handler to AccelByteOnGetMfaStatusComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
true if the task dispatched.

◆ GetUserAccount() [1/3]

TSharedPtr< FUserOnlineAccount > FOnlineIdentityAccelByte::GetUserAccount ( const FUniqueNetIdPtr & LocalUserId) const
virtual

Retrieve User Account information from given Local User.

Parameters
LocalUserIdSharedPtr of given Local User.
Returns
SharedPtr of User Account data.

◆ GetUserAccount() [2/3]

TSharedPtr< FUserOnlineAccount > FOnlineIdentityAccelByte::GetUserAccount ( const FUniqueNetIdRef & LocalUserId) const
virtual

Retrieve User Account information from given Local User.

Parameters
LocalUserIdSharedRef of given Local User.
Returns
SharedPtr of User Account data.

◆ GetUserAccount() [3/3]

TSharedPtr< FUserOnlineAccount > FOnlineIdentityAccelByte::GetUserAccount ( int LocalUserNum) const
virtual

Retrieve User Account information from given Local User.

Parameters
LocalUserNumthe controller number of the associated user.
Returns
SharedPtr of User Account data.

◆ InitializeLoginQueue()

void FOnlineIdentityAccelByte::InitializeLoginQueue ( int32 LoginUserNum,
const FString & TicketId )

Used to store ticket ID according to it's user num.

Parameters
LoginUserNumUserNum trying to login
TicketIdLogin queue ticket ID

◆ IsLogoutRequired()

bool FOnlineIdentityAccelByte::IsLogoutRequired ( int32 WsClosedConnectionStatusCode)
static

To decide whether the current user should be logged out or not. Logout required for specific range of codes. Which means connection closure is abnormal and client should not reconnect (i.e. ban & access token revocation)

◆ IsServerAuthenticated()

bool FOnlineIdentityAccelByte::IsServerAuthenticated ( int32 LocalUserNum = 0)

Check whether or not our server is authenticated or not

◆ RefreshPlatformToken() [1/2]

bool FOnlineIdentityAccelByte::RefreshPlatformToken ( int32 LocalUserNum)

Refresh the native platform token that is stored in the backend. Therefore we can prevent expiration on the backend. Default behavior: this function already registered automatically and follow the schedule of refresh token expiration. To disable this default:

  • Modify DefaultEngine.ini
  • Section [OnlineSubsystemAccelByte]
  • Set value bNativePlatformTokenRefreshManually=true
  • Do not forget to manually call this function periodically

◆ RefreshPlatformToken() [2/2]

bool FOnlineIdentityAccelByte::RefreshPlatformToken ( int32 LocalUserNum,
FName SubsystemName )

Refresh the native platform token that is stored in the backend. Therefore we can prevent expiration on the backend.

Parameters
SubsystemNameThe name of the subsystem authorization ticket that will be refreshed

◆ SendMfaCodeToEmail() [1/2]

bool FOnlineIdentityAccelByte::SendMfaCodeToEmail ( const FUniqueNetId & UserId,
const EAccelByteSendMfaEmailAction Action )

Send multifactor authentication code to user email. Add handler to AccelByteOnSendMfaCodeToEmailComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
ActionSupported action are update password, disable/enable email mfa (use EAccelByteSendMfaEmailAction::DisableMFAEmail for disable/enable).
Returns
true if the task dispatched.

◆ SendMfaCodeToEmail() [2/2]

bool FOnlineIdentityAccelByte::SendMfaCodeToEmail ( int32 LocalUserNum,
const EAccelByteSendMfaEmailAction Action )

Send multifactor authentication code to user email. Add handler to AccelByteOnSendMfaCodeToEmailComplete for the result.

Online delegate to notify user when send mfa code to email completed.

Parameters
LocalUserNumThe controller number of the associated user.
ActionSupported action are update password, disable/enable email mfa (use EAccelByteSendMfaEmailAction::DisableMFAEmail for disable/enable).
Returns
true if the task dispatched.

◆ SetAutoLoginCreateHeadless()

void FOnlineIdentityAccelByte::SetAutoLoginCreateHeadless ( bool bInIsAutoLoginCreateHeadless)

Set whether to create headless account when try to do 3rd party login using AutoLogin. The default value is true.

◆ SetLoginStatus()

void FOnlineIdentityAccelByte::SetLoginStatus ( int32 LocalUserNum,
ELoginStatus::Type NewStatus )

Set login status.

◆ UpdatePassword() [1/2]

bool FOnlineIdentityAccelByte::UpdatePassword ( const FUniqueNetId & UserId,
const FUpdatePasswordRequest & Request,
EAccelByteLoginAuthFactorType FactorType = EAccelByteLoginAuthFactorType::None,
const FString & Code = TEXT("") )

Update user password. Add handler to AccelByteOnUpdatePasswordComplete for the result.

Parameters
UserIdFUniqueNetId of the user who performed this action.
RequestThe request containing old and new password.
FactorType[optional] Multifactor authentication type (backup codes, email or authenticator app). Only needed if mfa for sensitive action enabled in the environment.
Code[optional] The code for multifactor authentication. Only needed if mfa for sensitive action enabled in the environment.
Returns
true if the task dispatched.

◆ UpdatePassword() [2/2]

bool FOnlineIdentityAccelByte::UpdatePassword ( int32 LocalUserNum,
const FUpdatePasswordRequest & Request,
EAccelByteLoginAuthFactorType FactorType = EAccelByteLoginAuthFactorType::None,
const FString & Code = TEXT("") )

Update user password. Add handler to AccelByteOnUpdatePasswordComplete for the result.

Parameters
LocalUserNumThe controller number of the associated user.
RequestThe request containing old and new password.
FactorType[optional] Multifactor authentication type (backup codes, email or authenticator app). Only needed if mfa for sensitive action enabled in the environment.
Code[optional] The code for multifactor authentication. Only needed if mfa for sensitive action enabled in the environment.
Returns
true if the task dispatched.

◆ VerifyLoginMfa()

bool FOnlineIdentityAccelByte::VerifyLoginMfa ( int32 LocalUserNum,
EAccelByteLoginAuthFactorType FactorType,
const FString & Code,
const FString & MfaToken,
bool bRememberDevice = false )

Verify user using multifactor authentication. Add handler to AccelByteOnLoginCompleteDelegate for the result.

Parameters
LocalUserNumThe controller number of the associated user.
FactorTypeMultifactor authentication type (backup codes, email or authenticator app).
CodeThe code for multifactor authentication.
MfaTokenThe mfa token received from AccelByteOnLoginCompleteDelegate.
bRememberDeviceOption to remember current device. If set to true the authentication only require once for every account.
Returns
true if the task dispatched.