TokenStorage
interface TokenStorage
Interface used to customize the way tokens are stored, updated, and removed throughout the lifecycle of an application.
A default implementation is provided, but for advanced use-cases, you may implement this protocol yourself and pass an instance to AuthFoundationDefaults.tokenStorageFactory.
Warning: When implementing a custom TokenStorage class, it's vitally important that you do not directly invoke any of these methods yourself. These methods are intended to be called on-demand by the other AuthFoundation classes, and the behavior is undefined if these methods are called directly by the developer.
Inheritors
Functions
Link copied to clipboard
abstract suspend fun add(token: Token, metadata: Token.Metadata, security: Credential.Security = Credential.Security.standard)
Add Token and its Token.Metadata to storage. Encrypt Token with specified security.
Link copied to clipboard
Link copied to clipboard
Set Token.Metadata for the token with Token.Metadata.id