InMemoryCredentialService

A CredentialService that keeps credentials in memory per app, user and credential key, so every session of a user shares them. It keeps each credential as saved, client secret included, and loses them all when the process exits.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun loadCredential(authConfig: AuthConfig, context: Context): AuthCredential?

Returns the credential stored under authConfig's AuthConfig.credentialKey for context, or null if there is none.

Link copied to clipboard
open suspend override fun saveCredential(authConfig: AuthConfig, context: Context)

Stores authConfig's AuthConfig.exchangedAuthCredential under its AuthConfig.credentialKey for context. If that credential is null, a later loadCredential returns null.