PushStorage

Interface for Push-specific storage operations. Extends the base MfaStorage interface with Push-specific functionality.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun clearPushCredentials()

Clear all Push credentials from the storage.

Link copied to clipboard
abstract suspend fun clearPushDeviceTokens()

Clear all Push device tokens from the storage.

Link copied to clipboard
abstract suspend fun clearPushNotifications()

Clear all Push notifications from the storage.

Link copied to clipboard
abstract suspend fun countPushNotifications(credentialId: String? = null): Int

Count the number of push notifications.

Link copied to clipboard
abstract suspend fun getAllPushCredentials(): List<PushCredential>

Retrieve all stored push credentials.

Link copied to clipboard

Retrieve all stored push device tokens.

Link copied to clipboard

Retrieve all stored push notifications.

Link copied to clipboard
abstract suspend fun getCredentialByIssuerAndAccount(issuer: String, accountName: String): PushCredential?

Retrieve a push credential by issuer and account name. This method performs a case-sensitive lookup to detect duplicate credentials.

Link copied to clipboard

Retrieve the current push device token.

Link copied to clipboard
abstract suspend fun getNotificationByMessageId(messageId: String): PushNotification?

Retrieve a push notification by message ID.

Link copied to clipboard
abstract suspend fun getOldestPushNotifications(limit: Int, credentialId: String? = null): List<PushNotification>

Retrieve the oldest push notifications.

Link copied to clipboard

Retrieve all pending push notifications.

Link copied to clipboard
abstract suspend fun purgePushNotificationsByAge(maxAgeDays: Int, credentialId: String? = null): Int

Purge push notifications by age.

Link copied to clipboard
abstract suspend fun purgePushNotificationsByCount(maxCount: Int, credentialId: String? = null): Int

Purge push notifications by count (removes oldest notifications when count exceeds the limit).

Link copied to clipboard
abstract suspend fun removePushCredential(credentialId: String): Boolean

Remove a push credential by its ID.

Link copied to clipboard
abstract suspend fun removePushNotification(notificationId: String): Boolean

Remove a push notification by its ID.

Link copied to clipboard
abstract suspend fun removePushNotificationsForCredential(credentialId: String): Int

Remove all push notifications associated with a credential.

Link copied to clipboard
abstract suspend fun retrievePushCredential(credentialId: String): PushCredential?

Retrieve a specific push credential by ID.

Link copied to clipboard
abstract suspend fun retrievePushNotification(notificationId: String): PushNotification?

Retrieve a specific push notification by ID.

Link copied to clipboard
abstract suspend fun storePushCredential(credential: PushCredential)

Store a push credential.

Link copied to clipboard
abstract suspend fun storePushDeviceToken(token: PushDeviceToken)

Store a push device token.

Link copied to clipboard
abstract suspend fun storePushNotification(notification: PushNotification)

Store a push notification.

Link copied to clipboard
abstract suspend fun updatePushNotification(notification: PushNotification)

Update a push notification.