public class EOS_Auth_Interface
extends com.sun.jna.PointerType
EOS_Platform_Interface.getAuthInterface()| Constructor and Description |
|---|
EOS_Auth_Interface() |
EOS_Auth_Interface(com.sun.jna.Pointer address) |
| Modifier and Type | Method and Description |
|---|---|
EOS_NotificationId |
addNotifyLoginStatusChanged(EOS_Auth_AddNotifyLoginStatusChangedOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnLoginStatusChangedCallback notification)
Register to receive login status updates.
|
EOS_Auth_IdToken |
copyIdToken(EOS_EpicAccountId accountId)
Fetch an ID token for an Epic Account ID.
|
EOS_Auth_Token |
copyUserAuthToken(EOS_Auth_CopyUserAuthTokenOptions options,
EOS_EpicAccountId localUserId)
Fetch a user auth token for an Epic Account ID.
|
void |
deletePersistentAuth(EOS_Auth_DeletePersistentAuthOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnDeletePersistentAuthCallback completionDelegate)
Deletes a previously received and locally stored persistent auth access token for the currently logged in user of the local device.
|
EOS_EpicAccountId |
getLoggedInAccountByIndex(int index)
Fetch an Epic Account ID that is logged in.
|
int |
getLoggedInAccountsCount()
Fetch the number of accounts that are logged in.
|
EOS_ELoginStatus |
getLoginStatus(EOS_EpicAccountId localUserId)
Fetches the login status for an Epic Account ID.
|
EOS_EpicAccountId |
getMergedAccountByIndex(EOS_EpicAccountId localUserId,
int index)
Fetch one of the merged account IDs for a given logged in account.
|
int |
getMergedAccountsCount(EOS_EpicAccountId localUserId)
Fetch the number of merged accounts for a given logged in account.
|
EOS_EpicAccountId |
getSelectedAccountId(EOS_EpicAccountId localUserId)
Fetch the selected account ID to the current application for a local authenticated user.
|
void |
linkAccount(EOS_Auth_LinkAccountOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnLinkAccountCallback completionDelegate)
Link external account by continuing previous login attempt with a continuance token.
|
void |
login(EOS_Auth_LoginOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnLoginCallback completionDelegate)
Login/Authenticate with user credentials.
|
void |
logout(EOS_Auth_LogoutOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnLogoutCallback completionDelegate)
Signs the player out of the online service.
|
void |
queryIdToken(EOS_Auth_QueryIdTokenOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnQueryIdTokenCallback completionDelegate)
Query the backend for an ID token that describes one of the merged account IDs of a local authenticated user.
|
void |
removeNotifyLoginStatusChanged(EOS_NotificationId inId)
Unregister from receiving login status updates.
|
void |
verifyIdToken(EOS_Auth_VerifyIdTokenOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnVerifyIdTokenCallback completionDelegate)
Verify a given ID token for authenticity and validity.
|
void |
verifyUserAuth(EOS_Auth_VerifyUserAuthOptions options,
com.sun.jna.Pointer clientData,
EOS_Auth_OnVerifyUserAuthCallback completionDelegate)
Contact the backend service to verify validity of an existing user auth token.
|
public EOS_Auth_Interface(com.sun.jna.Pointer address)
public EOS_Auth_Interface()
public void login(EOS_Auth_LoginOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnLoginCallback completionDelegate)
options - structure containing the account credentials to use during the login operationclientData - arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - a callback that is fired when the login operation completes, either successfully or in errorpublic void logout(EOS_Auth_LogoutOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnLogoutCallback completionDelegate)
options - structure containing information about which account to log out.clientData - arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - a callback that is fired when the logout operation completes, either successfully or in errorpublic void linkAccount(EOS_Auth_LinkAccountOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnLinkAccountCallback completionDelegate)
The user will be presented with Epic Accounts onboarding flow managed by the SDK.
On success, the user will be logged in at the completion of this action. This will commit this external account to the Epic Account and cannot be undone in the SDK.
options - structure containing the account credentials to use during the link account operationclientData - arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - a callback that is fired when the link account operation completes, either successfully or in errorpublic void deletePersistentAuth(EOS_Auth_DeletePersistentAuthOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnDeletePersistentAuthCallback completionDelegate)
On Desktop and Mobile platforms, the access token is deleted from the keychain of the local user and a backend request is made to revoke the token on the authentication server. On Console platforms, even though the caller is responsible for storing and deleting the access token on the local device, this function should still be called with the access token before its deletion to make the best effort in attempting to also revoke it on the authentication server. If the function would fail on Console, the caller should still proceed as normal to delete the access token locally as intended.
options - structure containing operation input parametersclientData - arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - a callback that is fired when the deletion operation completes, either successfully or in errorpublic void verifyUserAuth(EOS_Auth_VerifyUserAuthOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnVerifyUserAuthCallback completionDelegate)
options - structure containing information about the auth token being verifiedclientData - arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - a callback that is fired when the logout operation completes, either successfully or in errorcopyUserAuthToken(EOS_Auth_CopyUserAuthTokenOptions, EOS_EpicAccountId)public int getLoggedInAccountsCount()
public EOS_EpicAccountId getLoggedInAccountByIndex(int index)
index - An index into the list of logged in accounts. If the index is out of bounds, the returned Epic Account ID will be invalid.public EOS_ELoginStatus getLoginStatus(EOS_EpicAccountId localUserId)
localUserId - The Epic Account ID of the user being queriedpublic EOS_Auth_Token copyUserAuthToken(EOS_Auth_CopyUserAuthTokenOptions options, EOS_EpicAccountId localUserId) throws EOSException
A user authentication token allows any code with possession (backend/client) to perform certain actions on behalf of the user. Because of this, for the purposes of user identity verification, the EOS_Auth_CopyIdToken API should be used instead.
options - Structure containing the api version of CopyUserAuthToken to uselocalUserId - The Epic Account ID of the user being queriedEOSInvalidParametersException - if you pass a null pointer for the out parameterEOSNotFoundException - if the auth token is not found or expired.EOSExceptionEOS_Auth_Token.release()public EOS_Auth_IdToken copyIdToken(EOS_EpicAccountId accountId) throws EOSException
ID tokens are used to securely verify user identities with online services. The most common use case is using an ID token to authenticate the local user by their selected account ID, which is the account ID that should be used to access any game-scoped data for the current application.
An ID token for the selected account ID of a locally authenticated user will always be readily available. To retrieve it for the selected account ID, you can use EOS_Auth_CopyIdToken directly after a successful user login.
accountId - the account ID for which to copy an ID token.EOSInvalidParametersException - if you pass a null pointer for the out parameterEOSNotFoundException - if the Id token is not found or expired.EOSExceptionEOS_Auth_IdToken.release()public void queryIdToken(EOS_Auth_QueryIdTokenOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnQueryIdTokenCallback completionDelegate)
The ID token can be used to impersonate a merged account ID when communicating with online services.
An ID token for the selected account ID of a locally authenticated user will always be readily available and does not need to be queried explicitly.
options - Structure containing the merged account ID for which to query an ID token.clientData - Arbitrary data that is passed back to you in the CompletionDelegate.completionDelegate - A callback that is fired when the operation completes, either successfully or in error.public void verifyIdToken(EOS_Auth_VerifyIdTokenOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnVerifyIdTokenCallback completionDelegate)
options - Structure containing information about the ID token to verify.clientData - Arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate - A callback that is fired when the operation completes, either successfully or in error.public EOS_EpicAccountId getSelectedAccountId(EOS_EpicAccountId localUserId) throws EOSException
localUserId - The account ID of a currently logged in account.EOSInvalidParametersException - if the output parameter is NULL.EOSInvalidUserException - if the input account ID is not locally known.EOSInvalidAuthException - if the input account ID is not locally logged in.EOSNotFoundException - otherwise.EOSExceptionpublic int getMergedAccountsCount(EOS_EpicAccountId localUserId)
localUserId - The account ID of a currently logged in account.public EOS_EpicAccountId getMergedAccountByIndex(EOS_EpicAccountId localUserId, int index)
localUserId - The account ID of a currently logged in account.index - An index into the list of merged accounts. If the index is out of bounds, the returned Epic Account ID will be invalid.public EOS_NotificationId addNotifyLoginStatusChanged(EOS_Auth_AddNotifyLoginStatusChangedOptions options, com.sun.jna.Pointer clientData, EOS_Auth_OnLoginStatusChangedCallback notification)
removeNotifyLoginStatusChanged(EOS_NotificationId) when you no longer wish to have your NotificationHandler called.options - structure containing the api version of AddNotifyLoginStatusChanged to useclientData - arbitrary data that is passed back to you in the callbacknotification - a callback that is fired when the login status for a user changespublic void removeNotifyLoginStatusChanged(EOS_NotificationId inId)
inId - handle representing the registered callback