@aws-sdk/credential-provider-http
Advanced tools
Comparing version 3.422.1 to 3.423.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fromHttpForBrowser = void 0; | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./fromHttp/fromHttp"), exports); | ||
var fromHttp_browser_1 = require("./fromHttp/fromHttp.browser"); | ||
Object.defineProperty(exports, "fromHttpForBrowser", { enumerable: true, get: function () { return fromHttp_browser_1.fromHttp; } }); | ||
exports.fromHttp = void 0; | ||
var fromHttp_1 = require("./fromHttp/fromHttp"); | ||
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } }); |
@@ -1,2 +0,1 @@ | ||
export * from "./fromHttp/fromHttp"; | ||
export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser"; | ||
export { fromHttp } from "./fromHttp/fromHttp"; |
@@ -1,3 +0,2 @@ | ||
export * from "./fromHttp/fromHttp"; | ||
export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser"; | ||
export { fromHttp } from "./fromHttp/fromHttp"; | ||
export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes"; |
@@ -1,7 +0,1 @@ | ||
/** | ||
* @internal | ||
* | ||
* @param url - to be validated. | ||
* @throws if not acceptable to this provider. | ||
*/ | ||
export declare const checkUrl: (url: URL) => void; |
import { AwsCredentialIdentityProvider } from "@smithy/types"; | ||
import { FromHttpOptions } from "./fromHttpTypes"; | ||
/** | ||
* Creates a provider that gets credentials via HTTP request. | ||
*/ | ||
export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider; | ||
export declare const fromHttp: ( | ||
options: FromHttpOptions | ||
) => AwsCredentialIdentityProvider; |
import { AwsCredentialIdentityProvider } from "@smithy/types"; | ||
import { FromHttpOptions } from "./fromHttpTypes"; | ||
/** | ||
* Creates a provider that gets credentials via HTTP request. | ||
*/ | ||
export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider; | ||
export declare const fromHttp: ( | ||
options: FromHttpOptions | ||
) => AwsCredentialIdentityProvider; |
@@ -1,68 +0,17 @@ | ||
/** | ||
* @public | ||
* | ||
* Input for the fromHttp function in the HTTP Credentials Provider for Node.js. | ||
*/ | ||
export interface FromHttpOptions { | ||
/** | ||
* If this value is provided, it will be used as-is. | ||
* | ||
* For browser environments, use instead {@link credentialsFullUri}. | ||
*/ | ||
awsContainerCredentialsFullUri?: string; | ||
/** | ||
* If this value is provided instead of the full URI, it | ||
* will be appended to the default link local host of 169.254.170.2. | ||
* | ||
* Not supported in browsers. | ||
*/ | ||
awsContainerCredentialsRelativeUri?: string; | ||
/** | ||
* Will be read on each credentials request to | ||
* add an Authorization request header value. | ||
* | ||
* Not supported in browsers. | ||
*/ | ||
awsContainerAuthorizationTokenFile?: string; | ||
/** | ||
* An alternative to awsContainerAuthorizationTokenFile, | ||
* this is the token value itself. | ||
* | ||
* For browser environments, use instead {@link authorizationToken}. | ||
*/ | ||
awsContainerAuthorizationToken?: string; | ||
/** | ||
* BROWSER ONLY. | ||
* | ||
* In browsers, a relative URI is not allowed, and a full URI must be provided. | ||
* HTTPS is required. | ||
* | ||
* This value is required for the browser environment. | ||
*/ | ||
credentialsFullUri?: string; | ||
/** | ||
* BROWSER ONLY. | ||
* | ||
* Providing this value will set an "Authorization" request | ||
* header value on the GET request. | ||
*/ | ||
authorizationToken?: string; | ||
/** | ||
* Default is 3 retry attempts or 4 total attempts. | ||
*/ | ||
maxRetries?: number; | ||
/** | ||
* Default is 1000ms. Time in milliseconds to spend waiting between retry attempts. | ||
*/ | ||
timeout?: number; | ||
awsContainerCredentialsFullUri?: string; | ||
awsContainerCredentialsRelativeUri?: string; | ||
awsContainerAuthorizationTokenFile?: string; | ||
awsContainerAuthorizationToken?: string; | ||
credentialsFullUri?: string; | ||
authorizationToken?: string; | ||
maxRetries?: number; | ||
timeout?: number; | ||
} | ||
/** | ||
* @public | ||
*/ | ||
export type HttpProviderCredentials = { | ||
AccessKeyId: string; | ||
SecretAccessKey: string; | ||
Token: string; | ||
AccountId?: string; | ||
Expiration: string; | ||
AccessKeyId: string; | ||
SecretAccessKey: string; | ||
Token: string; | ||
AccountId?: string; | ||
Expiration: string; | ||
}; |
import { AwsCredentialIdentity } from "@aws-sdk/types"; | ||
import { HttpRequest } from "@smithy/protocol-http"; | ||
import { HttpResponse } from "@smithy/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare function createGetRequest(url: URL): HttpRequest; | ||
/** | ||
* @internal | ||
*/ | ||
export declare function getCredentials(response: HttpResponse): Promise<AwsCredentialIdentity>; | ||
export declare function getCredentials( | ||
response: HttpResponse | ||
): Promise<AwsCredentialIdentity>; |
@@ -1,10 +0,8 @@ | ||
/** | ||
* @internal | ||
*/ | ||
export interface RetryableProvider<T> { | ||
(): Promise<T>; | ||
(): Promise<T>; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
export declare const retryWrapper: <T>(toRetry: RetryableProvider<T>, maxRetries: number, delayMs: number) => RetryableProvider<T>; | ||
export declare const retryWrapper: <T>( | ||
toRetry: RetryableProvider<T>, | ||
maxRetries: number, | ||
delayMs: number | ||
) => RetryableProvider<T>; |
@@ -1,3 +0,5 @@ | ||
export * from "./fromHttp/fromHttp"; | ||
export { fromHttp as fromHttpForBrowser } from "./fromHttp/fromHttp.browser"; | ||
export { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes"; | ||
export { fromHttp } from "./fromHttp/fromHttp"; | ||
export { | ||
FromHttpOptions, | ||
HttpProviderCredentials, | ||
} from "./fromHttp/fromHttpTypes"; |
{ | ||
"name": "@aws-sdk/credential-provider-http", | ||
"version": "3.422.1", | ||
"version": "3.423.0", | ||
"description": "AWS credential provider for containers and HTTP sources", | ||
"main": "./dist-cjs/index.js", | ||
"module": "./dist-es/index.js", | ||
"browser": "./dist-es/index.browser.js", | ||
"react-native": "./dist-es/index.browser.js", | ||
"scripts": { | ||
@@ -8,0 +10,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", |
34
25726
571