OAuthProviderImpl
Default OAuthProvider implementation.
This class provides all methods required to interact with the Sensibill OAuth service.
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
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)