Creates an instance of AWSWebCore.
The configuration for the AWS WebCore.
Private
Readonly
configThe configuration for the AWS WebCore.
Private
Readonly
loggerPrivate
Readonly
tokenPrivate
buildAWSCredentialsPrivate
buildAWSCredentialsPrivate
Retrieves the current AWS credentials.
Builds AWS credentials using an OAuth token.
The OAuth token.
Builds a request using HttpRequestBuilder without Credentials.
The Axios request configuration.
Builds a signed request using AWSHttpRequestBuilder.
The Axios request configuration.
Changes the user site and returns new AWS credentials.
The body containing site change details.
Optional
url: stringOptional URL for the OAuth endpoint.
Will throw an error if changeSiteBody
, changeSiteBody.siteId
, or changeSiteBody.userId
are not provided.
const changeSiteBody = { siteId: 'newSiteId', userId: 'userId123' };
const credentials = await changeUserSite(changeSiteBody);
Private
createAWSCredentialsPrivate
Builds AWS credentials using an OAuth token.
Private
getAsynchronously retrieves the token signature.
Retrieves the token storage service.
Checks if there is a cached token and refreshes it if needed. If the token should be refreshed, it refreshes the token and updates the AWS credentials. If the token is still valid, it uses the cached credentials to build AWS credentials.
Refreshes the cached token new version
Optional
domain: string = ''The domain for the refresh request.
Optional
url: string = ''The request url for refresh token
Executes a HTTP request without Credentials.
Saves the KMS (Key Management Service) details to storage.
The KMS details.
Executes a signed HTTP request.
AWSWebCore class implements AWS-based operations for Lemoncloud authentication logic