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 AuthListenerGeneric Authentication listener to monitor common authentication processes |
| RegisterListener | interface RegisterListenerListener to observe the user registration process |
| SaveExpiryTokensListener | interface SaveExpiryTokensListenerListener to observe User Token storage during sign in. |
| SessionListener | interface SessionListenerListener to observe User Sign-in process |
Functions
| Name | Summary |
|---|---|
| checkPasswordStrength | open fun checkPasswordStrength(password: String, callback: PasswordStrengthCallback): UnitCall 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): UnitCall 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(): TokenProviderCall to get current token provider attached to SDK |
| isSessionCached | abstract fun isSessionCached(accessId: String): BooleanCall 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?): UnitCall 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): UnitCall 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): UnitCall 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): UnitCall 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): UnitCall 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): UnitCall to change the cached user identifier to the provided access id |
| userExists | open fun userExists(accessId: String, callback: AvailabilityCallback): UnitCall 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 |