OAuthProvider
interface OAuthProvider
This interface provides definitions for all methods required to interact with the Sensibill OAuth service.
Inheritors
Types
Link copied to clipboard
interface AccessTokenCallback
Link copied to clipboard
interface ForgetPasswordCallback
Link copied to clipboard
interface LogoutCallback
Functions
Link copied to clipboard
open fun authenticateUser(oauthSettings: OAuthSettings, username: String, password: String, callback: OAuthProvider.AccessTokenCallback)
Authenticates user using username and password, and returns User Session (AccessToken + RefreshToken + Token details, ie expiry) through AccessTokenCallback
abstract fun authenticateUser(oauthSettings: OAuthSettings, username: String, password: String, callback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope)
Link copied to clipboard
Use to trigger Forgot Password email to user email
abstract fun forgotPassword(email: String, callback: OAuthProvider.ForgetPasswordCallback, callbackScope: CoroutineScope)
Link copied to clipboard
Use client settings to generate Client Access Token
abstract fun getClientToken(oauthSettings: OAuthSettings, callback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope)
Link copied to clipboard
Performs user logout, invalidates user access token
abstract fun logout(accessToken: String, logoutCallback: OAuthProvider.LogoutCallback, callbackScope: CoroutineScope)
Link copied to clipboard
open fun refreshToken(refreshToken: String, oauthSettings: OAuthSettings, accessTokenCallback: OAuthProvider.AccessTokenCallback)
Use refresh token to get new access token
abstract fun refreshToken(refreshToken: String, oauthSettings: OAuthSettings, accessTokenCallback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope)