Skip to content

Instantly share code, notes, and snippets.

@dkhmelenko
Last active March 11, 2019 21:19
Show Gist options
  • Save dkhmelenko/7852e7606f4b5b250c88abbef41f1418 to your computer and use it in GitHub Desktop.
Save dkhmelenko/7852e7606f4b5b250c88abbef41f1418 to your computer and use it in GitHub Desktop.
interface SmartLockManager {
/**
* Retrieves stored credentials from Smartlock
*
* @return Single that emits stored credentials if there are any
*/
fun retrieveCredentials(context: Context): Single<Credential>
/**
* Retrieves sign in hints data
*
* @return Single that emits sign in data
*/
fun retrieveSignInHints(context: Context): Single<Hint>
/**
* Stores credentials to the SmartLock
*
* @param credential Credentials to store
* @return Completable
*/
fun storeCredentials(context: Context, credential: Credential): Completable
/**
* Deletes credentials from the SmartLock
*
* @param credential Credentials to delete
* @return Completable
*/
fun deleteStoredCredentials(context: Context, credential: Credential): Completable
/**
* Disables auto sign in feature
*
* @return Completable
*/
fun disableAutoSignIn(context: Context): Completable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment