TokenManager

interface TokenManager

Interface for managing authentication tokens.

Implementations of this interface are responsible for storing and retrieving access and refresh tokens used for authenticated requests to the MyAnimeList API.

Inheritors

Functions

Link copied to clipboard
abstract fun accessToken(): String?

Retrieves the current access token.

Link copied to clipboard
abstract fun clearTokens()

Clears all stored tokens, effectively logging out the user.

Link copied to clipboard
abstract fun refreshToken(): String?

Retrieves the current refresh token.

Link copied to clipboard
abstract fun storeTokens(accessToken: String, refreshToken: String?)

Stores the new access and refresh tokens.