com.getsensibill.sensibillauth / SensibillAuth
SensibillAuth
interface SensibillAuth
Interface that defines the properties of SensibillAuth Objects. SensibillAuth objects are used to as a way to provide on-device authentication. Functionality includes ability to sign-in (user identifier + password, logout and register new users.
Types
Name | Summary |
---|---|
AuthError | enum class AuthError |
AuthListener | interface AuthListener Generic Authentication listener to monitor common authentication processes |
RegisterListener | interface RegisterListener Listener to observe the user registration process |
SaveExpiryTokensListener | interface SaveExpiryTokensListener Listener to observe User Token storage during sign in. |
SessionListener | interface SessionListener Listener to observe User Sign-in process |
Functions
Name | Summary |
---|---|
checkPasswordStrength | open fun checkPasswordStrength(password: String , callback: PasswordStrengthCallback): Unit Call to check if password provided is valid abstract fun checkPasswordStrength(password: String , callback: PasswordStrengthCallback, callbackScope: CoroutineScope): Unit |
forgotPassword | open fun forgotPassword(email: String , callback: ForgetPasswordCallback): Unit Call to send the user with the provided email a Reset Email notificationabstract fun forgotPassword(email: String , callback: ForgetPasswordCallback, callbackScope: CoroutineScope): Unit |
getCachedUser | abstract fun getCachedUser(accessId: String ): SensibillUser ? Call to get a cached user |
getCurrUserAccessId | abstract fun getCurrUserAccessId(): String ? Call to get the current user identifier |
getTokenProvider | abstract fun getTokenProvider(): TokenProvider Call to get current token provider attached to SDK |
isSessionCached | abstract fun isSessionCached(accessId: String ): Boolean Call to check if a token is cached for the user with the provided user identifier |
logout | open fun logout(accessToken: String , accessId: String , callback: SensibillAuth.AuthListener ?): Unit Call to log-out of the SDK abstract fun logout(accessToken: String , accessId: String , callback: SensibillAuth.AuthListener ?, callbackScope: CoroutineScope): Unit |
registerWithPassword | open fun registerWithPassword(accessId: String , password: String , callback: SensibillAuth.RegisterListener ): Unit Call to register a user with the provided access identifier and password. abstract fun registerWithPassword(accessId: String , password: String , callback: SensibillAuth.RegisterListener , callbackScope: CoroutineScope): Unit |
registerWithUserInfo | open fun registerWithUserInfo(accessId: String , userInfo: UserInfo, callback: SensibillAuth.RegisterListener ): Unit Call to register a user with the provided user information abstract fun registerWithUserInfo(accessId: String , userInfo: UserInfo, callback: SensibillAuth.RegisterListener , callbackScope: CoroutineScope): Unit |
resetTemporaryPassword | open fun resetTemporaryPassword(accessId: String , temporaryPassword: String , newPassword: String , callback: SensibillAuth.AuthListener ): Unit Call to reset the user with accessId’s password with a provided new password abstract fun resetTemporaryPassword(accessId: String , temporaryPassword: String , newPassword: String , callback: SensibillAuth.AuthListener , callbackScope: CoroutineScope): Unit |
signIn | open fun signIn(accessId: String , password: String , callback: SensibillAuth.SessionListener ): Unit Call to sign in to the Sensibill SDK with the provided access identifier and password abstract fun signIn(accessId: String , password: String , callback: SensibillAuth.SessionListener , callbackScope: CoroutineScope): Unit |
switchUser | abstract fun switchUser(accessId: String ): Unit Call to change the cached user identifier to the provided access id |
userExists | open fun userExists(accessId: String , callback: AvailabilityCallback): Unit Call to check if a user with provided access id exists abstract fun userExists(accessId: String , callback: AvailabilityCallback, callbackScope: CoroutineScope): Unit |
Companion Object Properties
Name | Summary |
---|---|
defaultCallbackScope | val defaultCallbackScope: CoroutineScope |