Creates an instance of AWSStorageService.
AWS-specific web core configuration
Readonly
configAWS-specific web core configuration
Private
credentialList of credential keys stored in the token storage. These keys represent the complete set of AWS authentication data.
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
Retrieves cached AWS credentials (access key, secret key, session token). Returns the credentials in the format expected by AWS SDK.
Promise resolving to AWS credentials object
Retrieves and transforms cached OAuth token data. Converts snake_case storage keys to camelCase and structures the data for OAuth usage. Excludes sensitive credential details from the returned object.
Promise resolving to formatted OAuth token object
Saves KMS (Key Management Service) configuration to storage. Stores the KMS ARN for encryption/decryption operations.
KMS configuration object containing ARN
Promise that resolves when KMS data is saved
Saves OAuth token and associated AWS credentials to storage. Calculates and stores expiration and issued times for token lifecycle management.
OAuth token object containing credentials and metadata
Promise that resolves when save operation is complete
AWS-specific token storage service that manages OAuth tokens, credentials, and KMS configuration. Extends TokenStorageService to provide AWS Cognito and STS token management capabilities.