OAuthProviderImpl

class OAuthProviderImpl : OAuthProvider

Default OAuthProvider implementation.

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

Constructors

OAuthProviderImpl
Link copied to clipboard
fun OAuthProviderImpl(oAuthApi: OauthApi)
OAuthProviderImpl
Link copied to clipboard
fun OAuthProviderImpl(url: String)

Types

Companion
Link copied to clipboard
object Companion

Functions

authenticateUser
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): <ERROR CLASS>
forgotPassword
Link copied to clipboard
open fun forgotPassword(email: String, callback: OAuthProvider.ForgetPasswordCallback)
Use to trigger Forgot Password email to user email
open override fun forgotPassword(email: String, callback: OAuthProvider.ForgetPasswordCallback, callbackScope: CoroutineScope): <ERROR CLASS>
getClientToken
Link copied to clipboard
open fun getClientToken(oauthSettings: OAuthSettings, callback: OAuthProvider.AccessTokenCallback)
Use client settings to generate Client Access Token
open override fun getClientToken(oauthSettings: OAuthSettings, callback: OAuthProvider.AccessTokenCallback, callbackScope: CoroutineScope): <ERROR CLASS>
logout
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): <ERROR CLASS>
refreshToken
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): <ERROR CLASS>