Abstract
Constructs a TokenStorageService instance.
The configuration for the web core.
Protected
Readonly
configThe configuration for the web core.
Protected
prefixProtected
storageCalculates the token expiration timestamp with built-in safety buffer. Uses a priority-based approach: server expiration first, then JWT expiration, finally fallback duration. Automatically applies a 5-minute safety buffer to prevent token expiry during requests.
Optional
serverExpiration: stringISO string or date string from server response
Optional
jwtToken: stringJWT token string to extract expiration from
Unix timestamp (milliseconds) when the token should be considered expired
Extracts the issued time from a JWT token for token lifecycle tracking. Used to calculate token age and determine refresh timing based on token lifetime.
Optional
jwtToken: stringJWT token string to extract issued time from
Unix timestamp in milliseconds if found, empty string if not available or on error
Abstract
getAbstract
hasAbstract
should
Abstract class representing a token storage service. Provides methods to set and get items in storage, and abstract methods to check and manage cached tokens.