OAuthProviderImpl

Default OAuthProvider implementation.

This class provides all methods required to interact with the Sensibill OAuth service.

Constructors

Link copied to clipboard
constructor(oAuthApi: OauthApi)
constructor(url: String)

Types

Link copied to clipboard
object Companion

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

open override 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

open override fun forgotPassword(email: String, callback: OAuthProvider.ForgetPasswordCallback, callbackScope: CoroutineScope)
Link copied to clipboard

Use client settings to generate Client Access Token

open override fun getClientToken(oauthSettings: OAuthSettings, callback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope)
Link copied to clipboard
open fun logout(accessToken: String, logoutCallback: OAuthProvider.LogoutCallback)

Performs user logout, invalidates user access token

open override fun logout(accessToken: String, callback: 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

open override fun refreshToken(refreshToken: String, oauthSettings: OAuthSettings, accessTokenCallback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope)