Class Authentication

java.lang.Object
com.here.NativeBase
com.here.sdk.core.Authentication

public final class Authentication extends NativeBase

Use the authentication class to authenticate and retrieve a secure token that can be used with other HERE services.

  • 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.