AuthClient

interface AuthClient

Interface for dispatch requests to authentication Strivacity APIs. Note that instances of this interface must be manually disposed when no longer required, to avoid leaks.

Functions

Link copied to clipboard
abstract fun authorizeAuthCodeFlow(context: Context, callback: RequestCallback<AuthState>)

Sends an authorization request to perform implicit flow

Link copied to clipboard
abstract fun authorizeHybridFlow(context: Context, callback: RequestCallback<AuthState>)

Sends an authorization request to perform hybrid flow

Link copied to clipboard
abstract fun authorizeImplicitFlow(context: Context, callback: RequestCallback<AuthState>)

Sends an authorization request to perform implicit flow

Link copied to clipboard
abstract fun dispose()

Disposes state that will not normally be handled by garbage collection. This should be called when the auth client is no longer required, including when any owning activity is paused or destroyed (i.e. in Activity.onStop).

Link copied to clipboard
abstract fun getAuthState(): AuthState?

Return actual authentication state

Link copied to clipboard
abstract fun logout(context: Context, callback: RequestCallback<AuthState>)

Sends request to perform logout

Link copied to clipboard
abstract fun requestAccessToken(callback: RequestCallback<AuthState>)

Sends request to obtain an access token via client credentials

Link copied to clipboard
abstract fun requestIdToken(authCode: String, callback: RequestCallback<AuthState>)

Sends request to obtain an id token from auth code