@aws-sdk/credential-provider-cognito-identity 3.36.0 → 3.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist-cjs/index.js +2 -2
- package/dist-es/index.js +2 -2
- package/dist-types/index.d.ts +2 -2
- package/dist-types/ts3.4/CognitoProviderParameters.d.ts +3 -18
- package/dist-types/ts3.4/Storage.d.ts +1 -9
- package/dist-types/ts3.4/fromCognitoIdentity.d.ts +3 -13
- package/dist-types/ts3.4/fromCognitoIdentityPool.d.ts +5 -34
- package/dist-types/ts3.4/index.d.ts +2 -2
- package/dist-types/ts3.4/resolveLogins.d.ts +1 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
7
39
|
|
|
8
40
|
|
package/dist-cjs/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./CognitoProviderParameters"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./fromCognitoIdentity"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./fromCognitoIdentityPool"), exports);
|
|
7
5
|
tslib_1.__exportStar(require("./Logins"), exports);
|
|
8
6
|
tslib_1.__exportStar(require("./Storage"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./fromCognitoIdentity"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./fromCognitoIdentityPool"), exports);
|
package/dist-es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./CognitoProviderParameters";
|
|
2
|
-
export * from "./fromCognitoIdentity";
|
|
3
|
-
export * from "./fromCognitoIdentityPool";
|
|
4
2
|
export * from "./Logins";
|
|
5
3
|
export * from "./Storage";
|
|
4
|
+
export * from "./fromCognitoIdentity";
|
|
5
|
+
export * from "./fromCognitoIdentityPool";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./CognitoProviderParameters";
|
|
2
|
-
export * from "./fromCognitoIdentity";
|
|
3
|
-
export * from "./fromCognitoIdentityPool";
|
|
4
2
|
export * from "./Logins";
|
|
5
3
|
export * from "./Storage";
|
|
4
|
+
export * from "./fromCognitoIdentity";
|
|
5
|
+
export * from "./fromCognitoIdentityPool";
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import { CognitoIdentityClient } from "@aws-sdk/client-cognito-identity";
|
|
2
2
|
import { Logins } from "./Logins";
|
|
3
3
|
export interface CognitoProviderParameters {
|
|
4
|
-
|
|
5
|
-
* The SDK client with which the credential provider will contact the Amazon
|
|
6
|
-
* Cognito service.
|
|
7
|
-
*/
|
|
4
|
+
|
|
8
5
|
client: CognitoIdentityClient;
|
|
9
|
-
|
|
10
|
-
* The Amazon Resource Name (ARN) of the role to be assumed when multiple
|
|
11
|
-
* roles were received in the token from the identity provider. For example,
|
|
12
|
-
* a SAML-based identity provider. This parameter is optional for identity
|
|
13
|
-
* providers that do not support role customization.
|
|
14
|
-
*/
|
|
6
|
+
|
|
15
7
|
customRoleArn?: string;
|
|
16
|
-
|
|
17
|
-
* A set of key-value pairs that map external identity provider names to
|
|
18
|
-
* login tokens or functions that return promises for login tokens. The
|
|
19
|
-
* latter should be used when login tokens must be periodically refreshed.
|
|
20
|
-
*
|
|
21
|
-
* Logins should not be specified when trying to get credentials for an
|
|
22
|
-
* unauthenticated identity.
|
|
23
|
-
*/
|
|
8
|
+
|
|
24
9
|
logins?: Logins;
|
|
25
10
|
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* A subset of the Storage interface defined in the WHATWG HTML specification.
|
|
3
|
-
* Access by index is not supported, as it cannot be replicated without Proxy
|
|
4
|
-
* objects.
|
|
5
|
-
*
|
|
6
|
-
* The interface has been augmented to support asynchronous storage
|
|
7
|
-
*
|
|
8
|
-
* @see https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-interface
|
|
9
|
-
*/
|
|
1
|
+
|
|
10
2
|
export interface Storage {
|
|
11
3
|
getItem(key: string): string | null | Promise<string | null>;
|
|
12
4
|
removeItem(key: string): void | Promise<void>;
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import { Credentials, Provider } from "@aws-sdk/types";
|
|
2
2
|
import { CognitoProviderParameters } from "./CognitoProviderParameters";
|
|
3
3
|
export interface CognitoIdentityCredentials extends Credentials {
|
|
4
|
-
|
|
5
|
-
* The Cognito ID returned by the last call to AWS.CognitoIdentity.getOpenIdToken().
|
|
6
|
-
*/
|
|
4
|
+
|
|
7
5
|
identityId: string;
|
|
8
6
|
}
|
|
9
7
|
export declare type CognitoIdentityCredentialProvider = Provider<CognitoIdentityCredentials>;
|
|
10
|
-
|
|
11
|
-
* Retrieves temporary AWS credentials using Amazon Cognito's
|
|
12
|
-
* `GetCredentialsForIdentity` operation.
|
|
13
|
-
*
|
|
14
|
-
* Results from this function call are not cached internally.
|
|
15
|
-
*/
|
|
8
|
+
|
|
16
9
|
export declare function fromCognitoIdentity(parameters: FromCognitoIdentityParameters): CognitoIdentityCredentialProvider;
|
|
17
10
|
export interface FromCognitoIdentityParameters extends CognitoProviderParameters {
|
|
18
|
-
|
|
19
|
-
* The unique identifier for the identity against which credentials will be
|
|
20
|
-
* issued.
|
|
21
|
-
*/
|
|
11
|
+
|
|
22
12
|
identityId: string;
|
|
23
13
|
}
|
|
@@ -1,44 +1,15 @@
|
|
|
1
1
|
import { CognitoProviderParameters } from "./CognitoProviderParameters";
|
|
2
2
|
import { CognitoIdentityCredentialProvider } from "./fromCognitoIdentity";
|
|
3
3
|
import { Storage } from "./Storage";
|
|
4
|
-
|
|
5
|
-
* Retrieves or generates a unique identifier using Amazon Cognito's `GetId`
|
|
6
|
-
* operation, then generates temporary AWS credentials using Amazon Cognito's
|
|
7
|
-
* `GetCredentialsForIdentity` operation.
|
|
8
|
-
*
|
|
9
|
-
* Results from `GetId` are cached internally, but results from
|
|
10
|
-
* `GetCredentialsForIdentity` are not.
|
|
11
|
-
*/
|
|
4
|
+
|
|
12
5
|
export declare function fromCognitoIdentityPool({ accountId, cache, client, customRoleArn, identityPoolId, logins, userIdentifier, }: FromCognitoIdentityPoolParameters): CognitoIdentityCredentialProvider;
|
|
13
6
|
export interface FromCognitoIdentityPoolParameters extends CognitoProviderParameters {
|
|
14
|
-
|
|
15
|
-
* A standard AWS account ID (9+ digits).
|
|
16
|
-
*/
|
|
7
|
+
|
|
17
8
|
accountId?: string;
|
|
18
|
-
|
|
19
|
-
* A cache in which to store resolved Cognito IdentityIds. If not supplied,
|
|
20
|
-
* the credential provider will attempt to store IdentityIds in one of the
|
|
21
|
-
* following (in order of preference):
|
|
22
|
-
* 1. IndexedDB
|
|
23
|
-
* 2. LocalStorage
|
|
24
|
-
* 3. An in-memory cache object that will not persist between pages.
|
|
25
|
-
*
|
|
26
|
-
* IndexedDB is preferred to maximize data sharing between top-level
|
|
27
|
-
* browsing contexts and web workers.
|
|
28
|
-
*
|
|
29
|
-
* The provider will not cache IdentityIds of authenticated users unless a
|
|
30
|
-
* separate `userIdentitifer` parameter is supplied.
|
|
31
|
-
*/
|
|
9
|
+
|
|
32
10
|
cache?: Storage;
|
|
33
|
-
|
|
34
|
-
* The unique identifier for the identity pool from which an identity should
|
|
35
|
-
* be retrieved or generated.
|
|
36
|
-
*/
|
|
11
|
+
|
|
37
12
|
identityPoolId: string;
|
|
38
|
-
|
|
39
|
-
* A unique identifier for the user. This is distinct from a Cognito
|
|
40
|
-
* IdentityId and should instead be an identifier meaningful to your
|
|
41
|
-
* application. Used to cache Cognito IdentityIds on a per-user basis.
|
|
42
|
-
*/
|
|
13
|
+
|
|
43
14
|
userIdentifier?: string;
|
|
44
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./CognitoProviderParameters";
|
|
2
|
-
export * from "./fromCognitoIdentity";
|
|
3
|
-
export * from "./fromCognitoIdentityPool";
|
|
4
2
|
export * from "./Logins";
|
|
5
3
|
export * from "./Storage";
|
|
4
|
+
export * from "./fromCognitoIdentity";
|
|
5
|
+
export * from "./fromCognitoIdentityPool";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-cognito-identity",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.39.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn build:cjs && yarn build:es && yarn build:types",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-sdk/client-cognito-identity": "3.
|
|
23
|
-
"@aws-sdk/property-provider": "3.
|
|
24
|
-
"@aws-sdk/types": "3.
|
|
22
|
+
"@aws-sdk/client-cognito-identity": "3.39.0",
|
|
23
|
+
"@aws-sdk/property-provider": "3.38.0",
|
|
24
|
+
"@aws-sdk/types": "3.38.0",
|
|
25
25
|
"tslib": "^2.3.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|