Overview
//trimble-id-android/com.trimble.id.android/IAuthenticator
IAuthenticator
interface IAuthenticator
Common interface for Authenticator
Inheritors
| Authenticator |
Functions
| Name | Summary |
|---|---|
| getAccessToken | [androidJvm] abstract suspend fun getAccessToken(): String? Get access token of authenticated user. |
| getUserInfo | [androidJvm] abstract suspend fun getUserInfo(): User? Get user claims of authenticated user. |
| isLoggedIn | [androidJvm] abstract suspend fun isLoggedIn(): Boolean Get the logged in state. It returns true if a user is logged in else false. |
| login | [androidJvm] abstract fun login(loginCallback: ILoginResponseCallback, launchAsTrustedWebActivity: Boolean = false, forceNewLogin: Boolean = false) Log the user in. Login only after invoking registerLoginLauncher. |
| logout | [androidJvm] abstract fun logout(logoutCallback: ILogoutResponseCallback) Log the user out. Logout only after invoking registerLogoutLauncher. |
| registerLoginLauncher | [androidJvm] abstract fun registerLoginLauncher(context: AppCompatActivity) Registers the login launcher. Result from login will be later handled by this function. This method needs to be invoked in the onCreate() or onStart() of the LifecycleOwner. It should be invoked before login. |
| registerLogoutLauncher | [androidJvm] abstract fun registerLogoutLauncher(context: AppCompatActivity) Registers the logout launcher. Result from logout will be later handled by this function. This method needs to be invoked in the onCreate() or onStart() of the LifecycleOwner. It should be invoked before logout. |
| withManagedUser | [androidJvm] abstract fun withManagedUser(shortCode: String? = null): Authenticator Fluent extension to enable Managed user login flow @see link |
| withOfflineMode | [androidJvm] abstract fun withOfflineMode(): Authenticator Fluent extension to enable offline mode If offline mode is enabled, the user will be able to login without internet connection. When the user is offline, this method will allow the user to launch the cached offline page and login with a passkey only. User has to be already logged in once to use this feature. |
| withPostLogoutRedirectUri | [androidJvm] abstract fun withPostLogoutRedirectUri(postLogoutRedirectUri: String): Authenticator Fluent extension for adding logout Uri |