@toa.io/extensions.exposition 1.0.0-alpha.271 → 1.0.0-alpha.273
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 +40 -0
- package/components/{exposition.stash → exposition.atom}/manifest.toa.yaml +4 -4
- package/components/{exposition.stash → exposition.atom}/operations/meter.js +1 -1
- package/components/exposition.octets/manifest.toa.yaml +28 -10
- package/components/exposition.octets/operations/put.js +20 -5
- package/components/identity.bans/manifest.toa.yaml +26 -7
- package/components/identity.bans/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/manifest.toa.yaml +106 -30
- package/components/identity.basic/operations/authenticate.js +6 -3
- package/components/identity.basic/operations/authenticate.js.map +1 -1
- package/components/identity.basic/operations/incept.js +3 -2
- package/components/identity.basic/operations/incept.js.map +1 -1
- package/components/identity.basic/operations/transit.js +16 -5
- package/components/identity.basic/operations/transit.js.map +1 -1
- package/components/identity.basic/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/source/authenticate.ts +7 -3
- package/components/identity.basic/source/incept.ts +3 -2
- package/components/identity.basic/source/transit.ts +19 -5
- package/components/identity.credentials/manifest.toa.yaml +34 -13
- package/components/identity.credentials/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/manifest.toa.yaml +120 -28
- package/components/identity.federation/operations/authenticate.js +3 -2
- package/components/identity.federation/operations/authenticate.js.map +1 -1
- package/components/identity.federation/operations/create.js +4 -2
- package/components/identity.federation/operations/create.js.map +1 -1
- package/components/identity.federation/operations/lib/errors.d.ts +70 -11
- package/components/identity.federation/operations/lib/errors.js +40 -11
- package/components/identity.federation/operations/lib/errors.js.map +1 -1
- package/components/identity.federation/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/source/authenticate.ts +3 -2
- package/components/identity.federation/source/create.ts +4 -2
- package/components/identity.federation/source/lib/errors.ts +49 -12
- package/components/identity.keys/manifest.toa.yaml +14 -6
- package/components/identity.keys/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/manifest.toa.yaml +44 -15
- package/components/identity.otp/operations/authenticate.js +9 -4
- package/components/identity.otp/operations/authenticate.js.map +1 -1
- package/components/identity.otp/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/source/authenticate.ts +11 -4
- package/components/identity.passkeys/manifest.toa.yaml +38 -8
- package/components/identity.passkeys/operations/authenticate.js +3 -2
- package/components/identity.passkeys/operations/authenticate.js.map +1 -1
- package/components/identity.passkeys/operations/create.js +6 -3
- package/components/identity.passkeys/operations/create.js.map +1 -1
- package/components/identity.passkeys/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.passkeys/operations/use.js +6 -3
- package/components/identity.passkeys/operations/use.js.map +1 -1
- package/components/identity.passkeys/source/authenticate.ts +3 -2
- package/components/identity.passkeys/source/create.ts +7 -3
- package/components/identity.passkeys/source/use.ts +7 -3
- package/components/identity.roles/manifest.toa.yaml +41 -10
- package/components/identity.roles/operations/grant.js +3 -2
- package/components/identity.roles/operations/grant.js.map +1 -1
- package/components/identity.roles/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/source/grant.ts +3 -2
- package/components/identity.tokens/manifest.toa.yaml +99 -39
- package/components/identity.tokens/operations/authenticate.js +6 -3
- package/components/identity.tokens/operations/authenticate.js.map +1 -1
- package/components/identity.tokens/operations/decrypt.js +9 -4
- package/components/identity.tokens/operations/decrypt.js.map +1 -1
- package/components/identity.tokens/operations/encrypt.js +3 -2
- package/components/identity.tokens/operations/encrypt.js.map +1 -1
- package/components/identity.tokens/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/source/authenticate.ts +7 -3
- package/components/identity.tokens/source/decrypt.ts +11 -4
- package/components/identity.tokens/source/encrypt.ts +3 -2
- package/documentation/identity.md +4 -1
- package/documentation/notes/throttling.md +1 -1
- package/features/cors.feature +1 -1
- package/features/dev.feature +1 -1
- package/features/identity.federation.feature +3 -2
- package/features/{identtiy.tokens.custom.feature → identity.tokens.custom.feature} +39 -0
- package/features/introspection.feature +27 -34
- package/features/map.feature +1 -1
- package/features/octets.download.feature +1 -1
- package/features/octets.meta.feature +1 -1
- package/features/passkeys.feature +8 -8
- package/features/query.feature +27 -0
- package/features/require.feature +2 -2
- package/features/response.feature +3 -3
- package/features/steps/Components.ts +12 -4
- package/features/steps/Database.ts +9 -0
- package/features/steps/Gateway.ts +13 -13
- package/features/steps/HTTP.ts +3 -5
- package/features/steps/Parameters.ts +2 -3
- package/features/steps/Realtime.ts +4 -4
- package/features/steps/Workspace.ts +8 -3
- package/features/steps/components/audit/manifest.toa.yaml +12 -5
- package/features/steps/components/echo/manifest.toa.yaml +33 -8
- package/features/steps/components/notify/manifest.toa.yaml +12 -5
- package/features/steps/components/octets.tester/manifest.toa.yaml +43 -14
- package/features/steps/components/orders/manifest.toa.yaml +22 -5
- package/features/steps/components/pots/manifest.toa.yaml +71 -17
- package/features/steps/components/pricing/manifest.toa.yaml +8 -2
- package/features/steps/components/sequences/manifest.toa.yaml +3 -1
- package/features/steps/components/users/manifest.toa.yaml +18 -3
- package/features/steps/components/users.properties/manifest.toa.yaml +12 -2
- package/package.json +6 -7
- package/schemas/annotation.cos.yaml +37 -17
- package/schemas/directive.cos.yaml +7 -3
- package/schemas/io/throttle.cos.yaml +47 -8
- package/schemas/method.cos.yaml +21 -9
- package/schemas/node.cos.yaml +22 -7
- package/schemas/octets/delete.cos.yaml +15 -2
- package/schemas/octets/get.cos.yaml +5 -2
- package/schemas/octets/put.cos.yaml +6 -3
- package/schemas/octets/workflow.cos.yaml +0 -1
- package/schemas/query.cos.yaml +31 -14
- package/schemas/querystring.cos.yaml +19 -7
- package/schemas/range.cos.yaml +10 -2
- package/schemas/route.cos.yaml +6 -2
- package/source/Branch.test.ts +37 -0
- package/source/Branch.ts +37 -0
- package/source/Factory.ts +5 -5
- package/source/Gateway.ts +29 -14
- package/source/HTTP/formats/yaml.test.ts +4 -2
- package/source/RTD/Tree.ts +4 -1
- package/source/Tenant.ts +15 -4
- package/source/deployment.ts +3 -4
- package/source/directives/io/IO.ts +2 -2
- package/source/directives/io/lib/throttle/Sync.ts +4 -4
- package/source/directives/map/Headers.ts +8 -1
- package/source/directives/octets/Put.ts +6 -3
- package/source/root.ts +2 -2
- package/transpiled/Branch.d.ts +23 -0
- package/transpiled/Branch.js +16 -0
- package/transpiled/Branch.js.map +1 -1
- package/transpiled/Factory.js +4 -4
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +7 -0
- package/transpiled/Gateway.js +26 -8
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/RTD/Tree.js +4 -1
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/Tenant.d.ts +8 -2
- package/transpiled/Tenant.js +12 -2
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.js +3 -4
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/io/IO.d.ts +1 -1
- package/transpiled/directives/io/IO.js +2 -2
- package/transpiled/directives/io/IO.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Sync.d.ts +2 -2
- package/transpiled/directives/io/lib/throttle/Sync.js +4 -4
- package/transpiled/directives/io/lib/throttle/Sync.js.map +1 -1
- package/transpiled/directives/map/Headers.js +7 -1
- package/transpiled/directives/map/Headers.js.map +1 -1
- package/transpiled/directives/octets/Put.js.map +1 -1
- package/transpiled/root.js +1 -1
- package/transpiled/root.js.map +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Err } from 'error-value'
|
|
2
1
|
import { newid } from '@toa.io/generic'
|
|
3
2
|
import { resolve } from './lib'
|
|
4
3
|
import type { JWTPayload } from 'jose'
|
|
@@ -35,7 +34,9 @@ export async function effect ({ scheme, authority, credentials }: Input, context
|
|
|
35
34
|
return { identity: { id: credential.identity, claims } }
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
const ERR_NOT_FOUND = new
|
|
37
|
+
const ERR_NOT_FOUND = new (class NotFoundError extends Error {
|
|
38
|
+
public readonly code = 'NOT_FOUND'
|
|
39
|
+
})()
|
|
39
40
|
|
|
40
41
|
interface Input {
|
|
41
42
|
scheme: Scheme
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Err } from 'error-value'
|
|
2
1
|
import { resolve } from './lib'
|
|
3
2
|
import type { Context, Entity, Scheme } from './types'
|
|
4
3
|
|
|
@@ -36,4 +35,7 @@ export interface Input {
|
|
|
36
35
|
id: string
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
const ERR_EXISTS = new
|
|
38
|
+
const ERR_EXISTS = new (class ExistsError extends Error {
|
|
39
|
+
public readonly code = 'EXISTS'
|
|
40
|
+
public override readonly message = 'Federation credentials are associated with another Identity'
|
|
41
|
+
})()
|
|
@@ -1,12 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const
|
|
12
|
-
|
|
1
|
+
export const ERR_TRUST = new (class TrustError extends Error {
|
|
2
|
+
public readonly code = 'TRUST'
|
|
3
|
+
public override readonly message = 'Issuer not trusted'
|
|
4
|
+
})()
|
|
5
|
+
|
|
6
|
+
export const ERR_RESPONSE = new (class ResponseError extends Error {
|
|
7
|
+
public readonly code = 'RESPONSE'
|
|
8
|
+
public override readonly message = 'Request to IDP failed'
|
|
9
|
+
})()
|
|
10
|
+
|
|
11
|
+
export const ERR_CONFIG = new (class ConfigError extends Error {
|
|
12
|
+
public readonly code = 'CONFIG'
|
|
13
|
+
public override readonly message = 'Invalid OpenID configuration'
|
|
14
|
+
})()
|
|
15
|
+
|
|
16
|
+
export const ERR_NO_TOKEN = new (class NoTokenError extends Error {
|
|
17
|
+
public readonly code = 'NO_TOKEN'
|
|
18
|
+
public override readonly message = 'No ID token received'
|
|
19
|
+
})()
|
|
20
|
+
|
|
21
|
+
export const ERR_ISS = new (class IssError extends Error {
|
|
22
|
+
public readonly code = 'ISS'
|
|
23
|
+
public override readonly message = 'Invalid issuer claim'
|
|
24
|
+
})()
|
|
25
|
+
|
|
26
|
+
export const ERR_SUB = new (class SubError extends Error {
|
|
27
|
+
public readonly code = 'SUB'
|
|
28
|
+
public override readonly message = 'Invalid subject claim'
|
|
29
|
+
})()
|
|
30
|
+
|
|
31
|
+
export const ERR_EXP = new (class ExpError extends Error {
|
|
32
|
+
public readonly code = 'EXP'
|
|
33
|
+
public override readonly message = 'Token does not have an expiration time'
|
|
34
|
+
})()
|
|
35
|
+
|
|
36
|
+
export const ERR_REPLAY = new (class ReplayError extends Error {
|
|
37
|
+
public readonly code = 'REPLAY'
|
|
38
|
+
public override readonly message = 'Token has already been used'
|
|
39
|
+
})()
|
|
40
|
+
|
|
41
|
+
export const ERR_CODE_NOT_ENABLED = new (class CodeNotEnabledError extends Error {
|
|
42
|
+
public readonly code = 'CODE_NOT_ENABLED'
|
|
43
|
+
public override readonly message = 'Authorization code flow is not configured'
|
|
44
|
+
})()
|
|
45
|
+
|
|
46
|
+
export const ERR_CODE_SCHEMA = new (class CodeSchemaError extends Error {
|
|
47
|
+
public readonly code = 'CODE_SCHEMA'
|
|
48
|
+
public override readonly message = 'Invalid code credentials'
|
|
49
|
+
})()
|
|
@@ -4,20 +4,21 @@ name: keys
|
|
|
4
4
|
entity:
|
|
5
5
|
schema:
|
|
6
6
|
properties:
|
|
7
|
-
identity:
|
|
7
|
+
identity:
|
|
8
8
|
type: string
|
|
9
9
|
key:
|
|
10
10
|
type: string
|
|
11
|
-
label:
|
|
11
|
+
label:
|
|
12
12
|
type: string
|
|
13
13
|
minLength: 1
|
|
14
14
|
maxLength: 64
|
|
15
|
-
expires:
|
|
15
|
+
expires:
|
|
16
16
|
type: number
|
|
17
17
|
required:
|
|
18
18
|
- identity
|
|
19
19
|
- key
|
|
20
20
|
- label
|
|
21
|
+
type: object
|
|
21
22
|
index:
|
|
22
23
|
identity:
|
|
23
24
|
identity: asc
|
|
@@ -27,12 +28,18 @@ operations:
|
|
|
27
28
|
query: false
|
|
28
29
|
input:
|
|
29
30
|
properties:
|
|
30
|
-
identity:
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
identity:
|
|
32
|
+
type: string
|
|
33
|
+
label:
|
|
34
|
+
type: string
|
|
35
|
+
minLength: 1
|
|
36
|
+
maxLength: 64
|
|
37
|
+
expires:
|
|
38
|
+
type: number
|
|
33
39
|
required:
|
|
34
40
|
- identity
|
|
35
41
|
- label
|
|
42
|
+
type: object
|
|
36
43
|
output:
|
|
37
44
|
properties:
|
|
38
45
|
id:
|
|
@@ -42,6 +49,7 @@ operations:
|
|
|
42
49
|
required:
|
|
43
50
|
- id
|
|
44
51
|
- key
|
|
52
|
+
type: object
|
|
45
53
|
|
|
46
54
|
exposition:
|
|
47
55
|
/:identity:
|