@emulates/cognito 0.0.0-stage → 3.0.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 +19 -0
- package/DISCOVERY.md +55 -0
- package/README.md +66 -2
- package/SUPPORT.md +13 -0
- package/dist/chunk-BU4ORISY.js +3655 -0
- package/dist/chunk-BU4ORISY.js.map +7 -0
- package/dist/chunk-SC3COLG2.js +829 -0
- package/dist/chunk-SC3COLG2.js.map +7 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +936 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +1380 -0
- package/dist/server.js +12 -0
- package/dist/server.js.map +7 -0
- package/openapi.yaml +76 -0
- package/package.json +115 -4
package/dist/server.js
ADDED
package/openapi.yaml
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Amazon Cognito Identity Provider (Emulates subset)
|
|
4
|
+
version: "2016-04-18"
|
|
5
|
+
description: Hand-trimmed AWS JSON 1.1 user-pools contract used by the AWS SDK clients.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://cognito-idp.us-east-1.amazonaws.com
|
|
8
|
+
security:
|
|
9
|
+
- sigv4: []
|
|
10
|
+
paths:
|
|
11
|
+
/:
|
|
12
|
+
post:
|
|
13
|
+
operationId: CognitoRpc
|
|
14
|
+
x-emulates:
|
|
15
|
+
supported: true
|
|
16
|
+
parity: { enabled: true, safe: false }
|
|
17
|
+
parameters:
|
|
18
|
+
- name: X-Amz-Target
|
|
19
|
+
in: header
|
|
20
|
+
required: true
|
|
21
|
+
schema:
|
|
22
|
+
type: string
|
|
23
|
+
pattern: '^AWSCognitoIdentityProviderService\.[A-Za-z]+$'
|
|
24
|
+
requestBody:
|
|
25
|
+
required: true
|
|
26
|
+
content:
|
|
27
|
+
application/x-amz-json-1.1:
|
|
28
|
+
schema: { type: object, additionalProperties: true }
|
|
29
|
+
application/json:
|
|
30
|
+
schema: { type: object, additionalProperties: true }
|
|
31
|
+
responses:
|
|
32
|
+
"200":
|
|
33
|
+
description: Operation-specific AWS JSON response.
|
|
34
|
+
content:
|
|
35
|
+
application/x-amz-json-1.1:
|
|
36
|
+
schema: { type: object, additionalProperties: true }
|
|
37
|
+
"400":
|
|
38
|
+
description: Cognito service exception.
|
|
39
|
+
content:
|
|
40
|
+
application/x-amz-json-1.1:
|
|
41
|
+
schema:
|
|
42
|
+
type: object
|
|
43
|
+
required: [__type, message]
|
|
44
|
+
properties:
|
|
45
|
+
__type: { type: string }
|
|
46
|
+
message: { type: string }
|
|
47
|
+
additionalProperties: true
|
|
48
|
+
/{poolId}/.well-known/openid-configuration:
|
|
49
|
+
get:
|
|
50
|
+
operationId: Discovery
|
|
51
|
+
security: []
|
|
52
|
+
x-emulates: { supported: true, parity: { enabled: false, reason: Local issuer metadata. } }
|
|
53
|
+
parameters:
|
|
54
|
+
- { name: poolId, in: path, required: true, schema: { type: string } }
|
|
55
|
+
responses:
|
|
56
|
+
"200":
|
|
57
|
+
description: OIDC discovery.
|
|
58
|
+
content: { application/json: { schema: { type: object, additionalProperties: true } } }
|
|
59
|
+
/{poolId}/.well-known/jwks.json:
|
|
60
|
+
get:
|
|
61
|
+
operationId: Jwks
|
|
62
|
+
security: []
|
|
63
|
+
x-emulates: { supported: true, parity: { enabled: false, reason: Local signing keys. } }
|
|
64
|
+
parameters:
|
|
65
|
+
- { name: poolId, in: path, required: true, schema: { type: string } }
|
|
66
|
+
responses:
|
|
67
|
+
"200":
|
|
68
|
+
description: JSON Web Key Set.
|
|
69
|
+
content: { application/json: { schema: { type: object, additionalProperties: true } } }
|
|
70
|
+
components:
|
|
71
|
+
securitySchemes:
|
|
72
|
+
sigv4:
|
|
73
|
+
type: apiKey
|
|
74
|
+
in: header
|
|
75
|
+
name: Authorization
|
|
76
|
+
description: AWS SigV4; fixture signatures are accepted and access-key ids select namespaces.
|
package/package.json
CHANGED
|
@@ -1,6 +1,117 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emulates/cognito",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Stateful Amazon Cognito User Pools emulator for AWS SDK and browser authentication tests.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"DISCOVERY.md",
|
|
13
|
+
"SUPPORT.md",
|
|
14
|
+
"openapi.yaml"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./server": {
|
|
24
|
+
"types": "./dist/server.d.ts",
|
|
25
|
+
"default": "./dist/server.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"emulates-cognito": "./dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"provenance": true
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/crvouga/emulates.git",
|
|
38
|
+
"directory": "packages/service/cognito"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/crvouga/emulates/tree/main/packages/service/cognito#readme",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"emulates",
|
|
43
|
+
"aws",
|
|
44
|
+
"cognito",
|
|
45
|
+
"authentication",
|
|
46
|
+
"user-pools",
|
|
47
|
+
"emulator"
|
|
48
|
+
],
|
|
49
|
+
"emulates": {
|
|
50
|
+
"runtime": "portable",
|
|
51
|
+
"entries": {
|
|
52
|
+
"server": "node",
|
|
53
|
+
"cli": "node"
|
|
54
|
+
},
|
|
55
|
+
"layer": "service",
|
|
56
|
+
"category": "identity",
|
|
57
|
+
"displayName": "Amazon Cognito",
|
|
58
|
+
"vendor": {
|
|
59
|
+
"website": "https://aws.amazon.com/cognito/",
|
|
60
|
+
"docs": "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/"
|
|
61
|
+
},
|
|
62
|
+
"parity": "User pools and browser auth",
|
|
63
|
+
"parityTier": "cold",
|
|
64
|
+
"discovery": {
|
|
65
|
+
"guide": "DISCOVERY.md",
|
|
66
|
+
"behavior": "README.md",
|
|
67
|
+
"capabilities": "SUPPORT.md",
|
|
68
|
+
"contract": "openapi.yaml",
|
|
69
|
+
"types": "dist/index.d.ts",
|
|
70
|
+
"oracle": {
|
|
71
|
+
"kind": "Live vendor API or sandbox",
|
|
72
|
+
"command": "bun run parity:service -- cognito",
|
|
73
|
+
"note": "Run from an Emulates checkout; credentials come only from .env.local or GitHub Actions secrets. Missing credentials exit 2."
|
|
74
|
+
},
|
|
75
|
+
"introspection": [
|
|
76
|
+
"GET /__admin/health",
|
|
77
|
+
"GET /__admin",
|
|
78
|
+
"GET /__admin/state",
|
|
79
|
+
"GET /__admin/requests",
|
|
80
|
+
"GET /__admin/metrics",
|
|
81
|
+
"GET /__admin/faults/presets",
|
|
82
|
+
"GET /__admin/ui"
|
|
83
|
+
],
|
|
84
|
+
"reporting": "https://github.com/crvouga/emulates/blob/main/docs/REPORTING_ISSUES.md"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"generate": "bun ../../openapi/codegen/dist/cli.js",
|
|
89
|
+
"generate:check": "bun ../../openapi/codegen/dist/cli.js --check",
|
|
90
|
+
"openapi:check": "bun ../../openapi/codegen/dist/cli.js --validate",
|
|
91
|
+
"build": "bun ../../../scripts/bundle-service.ts",
|
|
92
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
93
|
+
"lint": "biome check .",
|
|
94
|
+
"test": "bun test",
|
|
95
|
+
"parity": "bun scripts/parity.ts",
|
|
96
|
+
"portability": "bun ../../../scripts/portability.ts",
|
|
97
|
+
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
98
|
+
},
|
|
99
|
+
"dependencies": {
|
|
100
|
+
"@emulates/sqlite": "3.0.0"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@aws-sdk/client-cognito-identity-provider": "3.1132.0",
|
|
104
|
+
"@emulates/adapter-node": "0.0.0-development",
|
|
105
|
+
"@emulates/core": "0.0.0-development",
|
|
106
|
+
"@emulates/http-codec": "0.0.0-development",
|
|
107
|
+
"@emulates/openapi": "0.0.0-development",
|
|
108
|
+
"@emulates/openapi-codegen": "0.1.0",
|
|
109
|
+
"@emulates/openapi-metadata": "0.0.0-development",
|
|
110
|
+
"@emulates/parity": "0.0.0-development",
|
|
111
|
+
"@emulates/service": "0.0.0-development",
|
|
112
|
+
"@emulates/sqlite-client": "0.0.0-development",
|
|
113
|
+
"@emulates/testing": "0.1.0",
|
|
114
|
+
"amazon-cognito-identity-js": "6.3.16",
|
|
115
|
+
"fast-check": "4.9.0"
|
|
116
|
+
}
|
|
117
|
+
}
|