@toa.io/extensions.exposition 1.0.0-alpha.272 → 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 +14 -0
- package/components/exposition.atom/manifest.toa.yaml +3 -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/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/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/require.feature +2 -2
- package/features/response.feature +3 -3
- package/features/steps/Components.ts +12 -4
- 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 +5 -6
- 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 -9
- 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 +20 -13
- package/source/HTTP/formats/yaml.test.ts +4 -2
- package/source/RTD/Tree.ts +4 -1
- package/source/Tenant.ts +3 -3
- package/source/deployment.ts +3 -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.js +17 -7
- 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 +1 -1
- package/transpiled/Tenant.js +1 -1
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.js +3 -4
- package/transpiled/deployment.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,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Transition = void 0;
|
|
4
|
-
const error_value_1 = require("error-value");
|
|
5
4
|
const server_1 = require("@simplewebauthn/server");
|
|
6
5
|
class Transition {
|
|
7
6
|
stash;
|
|
@@ -52,6 +51,10 @@ function toCredential(passkey) {
|
|
|
52
51
|
transports: passkey.transports
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
|
-
const ERR_FAILED = new
|
|
56
|
-
|
|
54
|
+
const ERR_FAILED = new (class FailedError extends Error {
|
|
55
|
+
code = 'FAILED';
|
|
56
|
+
})();
|
|
57
|
+
const ERR_INVALID = new (class InvalidError extends Error {
|
|
58
|
+
code = 'INVALID';
|
|
59
|
+
})();
|
|
57
60
|
//# sourceMappingURL=use.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../source/use.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../source/use.ts"],"names":[],"mappings":";;;AAAA,mDAAqE;AAKrE,MAA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|
|
3
2
|
import type { AuthenticationResponseJSON } from '@simplewebauthn/server'
|
|
4
3
|
import type { Operation } from '@toa.io/types'
|
|
@@ -38,7 +37,9 @@ export class Effect implements Operation {
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
const ERR_MISS = new
|
|
40
|
+
const ERR_MISS = new (class MissError extends Error {
|
|
41
|
+
public readonly code = 'MISS'
|
|
42
|
+
})()
|
|
42
43
|
|
|
43
44
|
export interface Input extends Omit<AuthenticationResponseJSON, 'rawId'> {
|
|
44
45
|
authority: string
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { verifyRegistrationResponse, type RegistrationResponseJSON } from '@simplewebauthn/server'
|
|
2
|
-
import { Err } from 'error-value'
|
|
3
2
|
import type { Operation } from '@toa.io/types'
|
|
4
3
|
import type { Context, Passkey } from './types'
|
|
5
4
|
|
|
@@ -66,8 +65,13 @@ export class Transition implements Operation {
|
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
const ERR_FAILED = new
|
|
70
|
-
|
|
68
|
+
const ERR_FAILED = new (class FailedError extends Error {
|
|
69
|
+
public readonly code = 'FAILED'
|
|
70
|
+
})()
|
|
71
|
+
|
|
72
|
+
const ERR_INVALID = new (class InvalidError extends Error {
|
|
73
|
+
public readonly code = 'INVALID'
|
|
74
|
+
})()
|
|
71
75
|
|
|
72
76
|
export interface Input extends RegistrationResponseJSON {
|
|
73
77
|
authority: string
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Err } from 'error-value'
|
|
2
1
|
import { verifyAuthenticationResponse } from '@simplewebauthn/server'
|
|
3
2
|
import type { AuthenticationResponseJSON, WebAuthnCredential } from '@simplewebauthn/server'
|
|
4
3
|
import type { Operation } from '@toa.io/types'
|
|
@@ -65,8 +64,13 @@ function toCredential (passkey: Passkey): WebAuthnCredential {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
const ERR_FAILED = new
|
|
69
|
-
|
|
67
|
+
const ERR_FAILED = new (class FailedError extends Error {
|
|
68
|
+
public readonly code = 'FAILED'
|
|
69
|
+
})()
|
|
70
|
+
|
|
71
|
+
const ERR_INVALID = new (class InvalidError extends Error {
|
|
72
|
+
public readonly code = 'INVALID'
|
|
73
|
+
})()
|
|
70
74
|
|
|
71
75
|
export interface Input extends Omit<AuthenticationResponseJSON, 'rawId'> {
|
|
72
76
|
origin: string
|
|
@@ -3,9 +3,19 @@ name: roles
|
|
|
3
3
|
|
|
4
4
|
entity:
|
|
5
5
|
schema:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
properties:
|
|
7
|
+
grantor:
|
|
8
|
+
type: string
|
|
9
|
+
identity:
|
|
10
|
+
type: string
|
|
11
|
+
pattern: '[a-z0-9]{32}'
|
|
12
|
+
role:
|
|
13
|
+
type: string
|
|
14
|
+
pattern: ^[a-zA-Z0-9]{0,32}(:[a-zA-Z0-9]{0,32}){0,8}$
|
|
15
|
+
type: object
|
|
16
|
+
required:
|
|
17
|
+
- identity
|
|
18
|
+
- role
|
|
9
19
|
unique:
|
|
10
20
|
role: [identity, role]
|
|
11
21
|
|
|
@@ -13,18 +23,39 @@ operations:
|
|
|
13
23
|
grant:
|
|
14
24
|
query: false
|
|
15
25
|
input:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
properties:
|
|
27
|
+
grantor:
|
|
28
|
+
properties:
|
|
29
|
+
id:
|
|
30
|
+
type: string
|
|
31
|
+
roles:
|
|
32
|
+
type: array
|
|
33
|
+
items:
|
|
34
|
+
type: string
|
|
35
|
+
type: object
|
|
36
|
+
identity:
|
|
37
|
+
type: string
|
|
38
|
+
default: .
|
|
39
|
+
role:
|
|
40
|
+
type: string
|
|
41
|
+
default: .
|
|
42
|
+
type: object
|
|
43
|
+
required:
|
|
44
|
+
- identity
|
|
45
|
+
- role
|
|
21
46
|
errors:
|
|
22
47
|
- INACCESSIBLE_SCOPE
|
|
23
48
|
list:
|
|
24
|
-
output:
|
|
49
|
+
output:
|
|
50
|
+
type: array
|
|
51
|
+
items:
|
|
52
|
+
type: string
|
|
25
53
|
principal:
|
|
26
54
|
input:
|
|
27
|
-
|
|
55
|
+
properties:
|
|
56
|
+
id:
|
|
57
|
+
type: string
|
|
58
|
+
type: object
|
|
28
59
|
|
|
29
60
|
receivers:
|
|
30
61
|
identity.basic.principal: principal
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transition = void 0;
|
|
4
|
-
const error_value_1 = require("error-value");
|
|
5
4
|
async function transition(input, object) {
|
|
6
5
|
if (input.grantor === undefined)
|
|
7
6
|
return Object.assign(object, input);
|
|
@@ -17,5 +16,7 @@ exports.transition = transition;
|
|
|
17
16
|
function within(role, scopes) {
|
|
18
17
|
return scopes.some((scope) => role === scope || role.startsWith(scope + ':'));
|
|
19
18
|
}
|
|
20
|
-
const ERR_INACCESSIBLE_SCOPE = new
|
|
19
|
+
const ERR_INACCESSIBLE_SCOPE = new (class InaccessibleScopeError extends Error {
|
|
20
|
+
code = 'INACCESSIBLE_SCOPE';
|
|
21
|
+
})();
|
|
21
22
|
//# sourceMappingURL=grant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grant.js","sourceRoot":"","sources":["../source/grant.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"grant.js","sourceRoot":"","sources":["../source/grant.ts"],"names":[],"mappings":";;;AAEO,KAAK,UAAU,UAAU,CAAE,KAAY,EAAE,MAAc;IAC5D,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAErC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACvD,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACxC,OAAO,sBAAsB,CAAA;IAE/B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;IACxB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IAChC,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAA;IAEjC,OAAO,MAAM,CAAA;AACf,CAAC;AAbD,gCAaC;AAED,SAAS,MAAM,CAAE,IAAY,EAAE,MAAgB;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAA;AAC/E,CAAC;AAED,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,sBAAuB,SAAQ,KAAK;IAC5D,IAAI,GAAG,oBAAoB,CAAA;CAC5C,CAAC,EAAE,CAAA"}
|