public enum EOS_ELoginCredentialType extends java.lang.Enum<EOS_ELoginCredentialType> implements com.sun.jna.NativeMapped
EOS_Auth_Interface.login(EOS_Auth_LoginOptions, Pointer, EOS_Auth_OnLoginCallback),
EOS_Auth_Credentials| Enum Constant and Description |
|---|
EOS_LCT_AccountPortal
Used by standalone applications distributed outside the supported game platforms such as Epic Games Store or Steam, and on Nintendo Switch.
|
EOS_LCT_Developer
Login with named credentials hosted by the EOS SDK Developer Authentication Tool.
|
EOS_LCT_DeviceCode
Not supported.
|
EOS_LCT_ExchangeCode
A short-lived one-time use exchange code to login the local user.
|
EOS_LCT_ExternalAuth
Login using external account provider credentials, such as PlayStation(TM)Network, Steam, and Xbox Live.
|
EOS_LCT_Password
Login using account email address and password.
|
EOS_LCT_PersistentAuth
Used by standalone applications distributed outside the supported game platforms such as Epic Games Store or Steam, and on Nintendo Switch.
|
EOS_LCT_RefreshToken
Refresh token that was retrieved from a previous call to EOS_Auth_Login API in another local process context.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
fromNative(java.lang.Object nativeValue,
com.sun.jna.FromNativeContext context) |
java.lang.Class<?> |
nativeType() |
java.lang.Object |
toNative() |
static EOS_ELoginCredentialType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EOS_ELoginCredentialType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EOS_ELoginCredentialType EOS_LCT_Password
Note: This login method is restricted to Epic Games internal use only. Do not use.
public static final EOS_ELoginCredentialType EOS_LCT_ExchangeCode
Typically retrieved via command-line parameters provided by a launcher that generated the exchange code for this application. When started, the application is expected to consume the exchange code by using the EOS_Auth_Login API as soon as possible. This is needed in order to authenticate the local user before the exchange code would expire. Attempting to consume an already expired exchange code will return EOS_EResult::EOS_Auth_ExchangeCodeNotFound error by the EOS_Auth_Login API.
public static final EOS_ELoginCredentialType EOS_LCT_PersistentAuth
Persistent Auth is used in conjunction with the EOS_LCT_AccountPortal login method for automatic login of the local user across multiple runs of the application.
Standalone applications implement the login sequence as follows:
1. Application calls EOS_Auth_Login with EOS_LCT_PersistentAuth, using a previously stored Epic refresh token for an automatic user login.
2. If automatic login fails, the application discards the Epic refresh token used as defunct, and proceeds to call EOS_Auth_Login with EOS_LCT_AccountPortal to prompt the user for manual login.
On Desktop and Mobile platforms, the persistent refresh token is automatically managed by the SDK that stores it in the keychain of the currently logged in user of the local device. On Nintendo Switch, after a successful login the refresh token must be retrieved using the EOS_Auth_CopyUserAuthToken API and stored by the application specifically for the active Nintendo Switch user.
EOS_LCT_AccountPortalpublic static final EOS_ELoginCredentialType EOS_LCT_DeviceCode
EOS_LCT_ExternalAuthpublic static final EOS_ELoginCredentialType EOS_LCT_Developer
Used for development purposes only.
public static final EOS_ELoginCredentialType EOS_LCT_RefreshToken
Can be used for example when launching the game from Epic Games Launcher and having an intermediate process in-between that requires authenticating the user before eventually starting the actual game client application. In such scenario, an intermediate launcher will log in the user by consuming the exchange code it received from the Epic Games Launcher. To allow the game client to also authenticate the user, it can copy the refresh token using the EOS_Auth_CopyUserAuthToken API and pass it via launch parameters to the started game client. The game client can then use the refresh token to log in the user.
public static final EOS_ELoginCredentialType EOS_LCT_AccountPortal
Login using the built-in user onboarding experience provided by the SDK, which will automatically store a persistent refresh token to enable automatic user login for consecutive application runs on the local device. Applications are expected to attempt automatic login using the EOS_LCT_PersistentAuth login method, and fall back to EOS_LCT_AccountPortal to prompt users for manual login.
On Windows, using this login method requires applications to be started through the EOS Bootstrapper application and to have the local Epic Online Services redistributable installed on the local system. See EOS_Platform_GetDesktopCrossplayStatus for adding a readiness check prior to calling EOS_Auth_Login.
EOS_LCT_PersistentAuthpublic static final EOS_ELoginCredentialType EOS_LCT_ExternalAuth
This is the intended login method on PlayStation® and Xbox console devices. On Desktop and Mobile, used when launched through any of the commonly supported platform clients.
The user is seamlessly logged in to their Epic account using an external account access token. If the local platform account is already linked with the user's Epic account, the login will succeed and EOS_EResult::EOS_Success is returned. When the local platform account has not been linked with an Epic account yet, EOS_EResult::EOS_InvalidUser is returned and the EOS_ContinuanceToken will be set in the EOS_Auth_LoginCallbackInfo data. If EOS_EResult::EOS_InvalidUser is returned, the application should proceed to call the EOS_Auth_LinkAccount API with the EOS_ContinuanceToken to continue with the external account login and to link the external account at the end of the login flow.
Login flow when the platform user account has not been linked with an Epic account yet:
1. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.
2. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.
3. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.
4. The user is taken automatically to the Epic accounts user onboarding flow managed by the SDK.
5. Once the user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount invokes the completion callback to the caller.
- If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.
On Windows, using this login method requires applications to be started through the EOS Bootstrapper application and to have the local Epic Online Services redistributable installed on the local system. See EOS_Platform_GetDesktopCrossplayStatus for adding a readiness check prior to calling EOS_Auth_Login.
public static EOS_ELoginCredentialType[] values()
for (EOS_ELoginCredentialType c : EOS_ELoginCredentialType.values()) System.out.println(c);
public static EOS_ELoginCredentialType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.lang.Object fromNative(java.lang.Object nativeValue,
com.sun.jna.FromNativeContext context)
fromNative in interface com.sun.jna.NativeMappedpublic java.lang.Object toNative()
toNative in interface com.sun.jna.NativeMappedpublic java.lang.Class<?> nativeType()
nativeType in interface com.sun.jna.NativeMapped