OmhCredentials

interface OmhCredentials

An abstraction to provide access to the user's tokens and their functionalities. This doesn't require the user to be logged in to be created, it will just return null values or exceptions when trying to refresh tokens.

Functions

Link copied to clipboard
abstract fun blockingRefreshToken(): String?

This is a blocking async call and should never be called from the main thread. This is designed for use in an authenticator or interceptor for an OkHttp client, which is why the call blocks the tread for simulating a sync call.

Properties

Link copied to clipboard
abstract val accessToken: String?

Fetches the access token from the secure storage if possible. If no token is stored, null is returned.