Authentication (API Reference)
Package com.here.sdk.core
Class Authentication
java.lang.Object
com.here.NativeBase
com.here.sdk.core.Authentication
Use the authentication class to authenticate and retrieve a secure token that can be used with other HERE services.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationDataauthenticate(SDKNativeEngine sdkNativeEngine) Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token.static voidauthenticate(SDKNativeEngine sdkNativeEngine, AuthenticationCallback callback) Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token.
-
Method Details
-
authenticate
public static void authenticate(@NonNull SDKNativeEngine sdkNativeEngine, @NonNull AuthenticationCallback callback) Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token. This method operates asynchronously.
- Parameters:
sdkNativeEngine-The SDK engine instance.
callback-Callback to retrieve an authentication token on the main thread.
-
authenticate
@NonNull public static AuthenticationData authenticate(@NonNull SDKNativeEngine sdkNativeEngine) throws AuthenticationException Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token. This method operates synchronously.
- Parameters:
sdkNativeEngine-The SDK engine instance.
- Returns:
Authentication data.
- Throws:
AuthenticationException-Authentication exception that describes the error.
-