Class 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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AuthenticationData authenticate​(SDKNativeEngine sdkNativeEngine)
      Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token.
      static void authenticate​(SDKNativeEngine sdkNativeEngine, AuthenticationCallback callback)
      Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

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