public class Authentication
extension Authentication: NativeBase
extension Authentication: Hashable

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

  • Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token. This method operates asynchronously.

    Declaration

    Swift

    public static func authenticate(sdkNativeEngine: SDKNativeEngine, callback: @escaping AuthenticationCompletionHandler)

    Parameters

    sdkNativeEngine

    The SDK engine instance.

    callback

    Protocol to retrieve an authentication token on the main thread.

  • Uses the authentication service that is connected to the given SDK engine to authenticate and retrieve a secure token. This method operates synchronously.

    Throws

    AuthenticationException Authentication exception that describes the error.

    Declaration

    Swift

    public static func authenticate(sdkNativeEngine: SDKNativeEngine) throws -> AuthenticationData

    Parameters

    sdkNativeEngine

    The SDK engine instance.

    Return Value

    Authentication data.