@owlmeans/test-auth 0.1.18-rc.45 → 0.1.18-rc.46
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/README.md +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/testing-auth-unit/SKILL.md +1 -1
- package/build/consts.local.d.ts +2 -0
- package/build/consts.local.d.ts.map +1 -1
- package/build/consts.local.js +3 -0
- package/build/consts.local.js.map +1 -1
- package/build/envelope.d.ts.map +1 -1
- package/build/envelope.js +1 -1
- package/build/envelope.js.map +1 -1
- package/build/guard.d.ts +1 -1
- package/build/guard.d.ts.map +1 -1
- package/build/guard.js +1 -1
- package/build/guard.js.map +1 -1
- package/package.json +9 -9
- package/src/consts.local.ts +5 -0
- package/src/envelope.ts +1 -2
- package/src/guard.ts +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Helpers exported here:
|
|
|
7
7
|
- `makeFixtureKeyPair(seed?)` — deterministic Ed25519 `KeyPairModel`.
|
|
8
8
|
- `makeMemoryTrustedResource(records?)` — `Resource<TrustedRecord>` satisfying `trust()` lookups against the `TRUSTED` config resource.
|
|
9
9
|
- `makeMockGuard({ alias?, auth?, allow? })` — `GuardService` that resolves to a chosen `Auth`. Implements `match`, `handle`, `authenticated`.
|
|
10
|
-
- `
|
|
10
|
+
- `appendMockGuard(ctx, auth, alias?)` — convenience that registers a mock guard with a chosen `Auth` on the context.
|
|
11
11
|
- `signMockEnvelope(msg, type, kind?, kp?)` — wraps `makeEnvelopeModel` with a fixture keypair to produce a signed envelope.
|
|
12
12
|
- `makeBearer(auth, kp?)` — `ED25519-BASIC-TOKEN <encoded>` header value for unit tests of header parsing.
|
|
13
13
|
- Canonical fixtures: `SUPERUSER`, `USER`, `SERVICE` `Auth` payloads.
|
|
@@ -20,7 +20,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
20
20
|
your project's skill store (`.agents/skills/`):
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
23
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.49
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/test-auth",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.46",
|
|
5
|
+
"generatedAt": "2026-10-05T21:03:06.365Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -6,7 +6,7 @@ description: Category-B unit tests for OwlMeans Common — auth/authz packages w
|
|
|
6
6
|
|
|
7
7
|
# Auth Unit Tests — Category B
|
|
8
8
|
|
|
9
|
-
**Install:** `"@owlmeans/test-auth": "^0.1.18-rc.
|
|
9
|
+
**Install:** `"@owlmeans/test-auth": "^0.1.18-rc.46"` in `devDependencies`
|
|
10
10
|
|
|
11
11
|
Category B applies to the auth/authz packages: `auth`, `auth-common`, `auth-otp`, `basic-envelope`, `basic-keys`, `client-auth`, `client-did`, `client-iam`, `client-payment`, `did`, `mui-oidc-rp`, `oidc`, `server-auth`, `server-auth-otp`, `server-oidc-provider`, `server-oidc-rp`, `web-auth`, `web-oidc-provider`, `web-oidc-rp`, `wled`. These tests run under `bun test` (no Playwright even when there are React bits) and are the **only** place mocks are allowed — and only for authentication/authorization, via `@owlmeans/test-auth`.
|
|
12
12
|
|
package/build/consts.local.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const TRUSTED_DEFAULT_ALIAS = "TRUSTED";
|
|
2
2
|
/** The fields a `trust()` lookup keys on — the only index this map has. */
|
|
3
3
|
export declare const SUPPORTED_FIELDS: string[];
|
|
4
|
+
/** The scheme word of an `Authorization` header carrying an Ed25519 basic token. */
|
|
5
|
+
export declare const AUTH_BEARER_PREFIX: string;
|
|
4
6
|
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAE9C,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,UAAiB,CAAA;AAE9C,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,QAAoD,CAAA"}
|
package/build/consts.local.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { AuthroizationType } from '@owlmeans/auth';
|
|
1
2
|
export const TRUSTED_DEFAULT_ALIAS = 'TRUSTED';
|
|
2
3
|
/** The fields a `trust()` lookup keys on — the only index this map has. */
|
|
3
4
|
export const SUPPORTED_FIELDS = ['id', 'name'];
|
|
5
|
+
/** The scheme word of an `Authorization` header carrying an Ed25519 basic token. */
|
|
6
|
+
export const AUTH_BEARER_PREFIX = AuthroizationType.Ed25519BasicToken.toUpperCase();
|
|
4
7
|
//# sourceMappingURL=consts.local.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAA;AAE9C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../src/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAA;AAE9C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAE9C,oFAAoF;AACpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAA"}
|
package/build/envelope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAI1C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAU,CAAC,SAAS,EAAE,GAAG,MAAM,OACrD,CAAC,QACA,MAAM,SACN,YAAY,OACd,YAAY,KACf,OAAO,CAAC,MAAM,CAKhB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,SACf,IAAI,OACL,YAAY,KAChB,OAAO,CAAC,MAAM,CAQhB,CAAA"}
|
package/build/envelope.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnvelopeKind, makeEnvelopeModel } from '@owlmeans/basic-envelope';
|
|
2
2
|
import { AuthroizationType } from '@owlmeans/auth';
|
|
3
3
|
import { makeFixtureKeyPair } from './keys.js';
|
|
4
|
-
|
|
4
|
+
import { AUTH_BEARER_PREFIX } from './consts.local.js';
|
|
5
5
|
/**
|
|
6
6
|
* Wrap a payload in a signed `EnvelopeModel` using a fixture keypair (or one
|
|
7
7
|
* supplied by the caller) and serialize it. Useful in category-B tests that
|
package/build/envelope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,GAAM,EACN,IAAY,EACZ,IAAI,GAAiB,YAAY,CAAC,KAAK,EACvC,EAAE,GAAiB,kBAAkB,CAAC,mBAAmB,CAAC,EACzC,EAAE;IACnB,MAAM,QAAQ,GAAG,iBAAiB,CAAI,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAClB,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAC5C,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,IAAU,EACV,EAAiB,EACA,EAAE;IACnB,MAAM,OAAO,GAAG,MAAM,gBAAgB,CACpC,IAA0C,EAC1C,iBAAiB,CAAC,iBAAiB,EACnC,YAAY,CAAC,KAAK,EAClB,EAAE,CACH,CAAA;IACD,OAAO,GAAG,kBAAkB,IAAI,OAAO,EAAE,CAAA;AAC3C,CAAC,CAAA"}
|
package/build/guard.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export declare const makeMockGuard: (opts?: MockGuardOptions) => GuardService;
|
|
|
18
18
|
* Returns the same context for chaining. Existing guards under the same
|
|
19
19
|
* alias are not replaced — register before any real guard service.
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const appendMockGuard: <C extends BasicConfig, T extends BasicContext<C>>(context: T, auth: Auth, alias?: string) => T;
|
|
22
22
|
//# sourceMappingURL=guard.d.ts.map
|
package/build/guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,UAAU,gBAAgB,KAAQ,YAsB3D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,UAAU,gBAAgB,KAAQ,YAsB3D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,WACrE,CAAC,QACJ,IAAI,UACH,MAAM,KACZ,CAGF,CAAA"}
|
package/build/guard.js
CHANGED
|
@@ -33,7 +33,7 @@ export const makeMockGuard = (opts = {}) => {
|
|
|
33
33
|
* Returns the same context for chaining. Existing guards under the same
|
|
34
34
|
* alias are not replaced — register before any real guard service.
|
|
35
35
|
*/
|
|
36
|
-
export const
|
|
36
|
+
export const appendMockGuard = (context, auth, alias = DEFAULT_GUARD) => {
|
|
37
37
|
const guard = makeMockGuard({ alias, auth });
|
|
38
38
|
return context.registerService(guard);
|
|
39
39
|
};
|
package/build/guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuC,MAAM,mBAAmB,CAAA;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAKrD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,GAAqB,EAAE,EAAgB,EAAE;IACzE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,aAAa,CAAA;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;IAExC,MAAM,KAAK,GAAG,aAAa,CAAe,KAAK,EAAE;QAC/C,KAAK,EAAE,IAAI,CAAC,KAAK;QAEjB,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACxB,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;QACvC,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC1B,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;gBACtB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACxB,CAAC;YACD,OAAO,IAAI,CAAC,IAAa,CAAA;QAC3B,CAAC;QAED,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI;KAC9C,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuC,MAAM,mBAAmB,CAAA;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAKrD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,GAAqB,EAAE,EAAgB,EAAE;IACzE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,aAAa,CAAA;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;IAExC,MAAM,KAAK,GAAG,aAAa,CAAe,KAAK,EAAE;QAC/C,KAAK,EAAE,IAAI,CAAC,KAAK;QAEjB,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACxB,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;QACvC,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC1B,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;gBACtB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACxB,CAAC;YACD,OAAO,IAAI,CAAC,IAAa,CAAA;QAC3B,CAAC;QAED,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI;KAC9C,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,OAAU,EACV,IAAU,EACV,KAAK,GAAW,aAAa,EAC1B,EAAE;IACL,MAAM,KAAK,GAAG,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5C,OAAO,OAAO,CAAC,eAAe,CAAI,KAAK,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/test-auth",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.46",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/basic-envelope": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/basic-keys": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
29
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/test": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/auth": "^0.1.18-rc.40",
|
|
25
|
+
"@owlmeans/auth-common": "^0.1.18-rc.47",
|
|
26
|
+
"@owlmeans/basic-envelope": "^0.1.18-rc.46",
|
|
27
|
+
"@owlmeans/basic-keys": "^0.1.18-rc.48",
|
|
28
|
+
"@owlmeans/context": "^0.1.18-rc.34",
|
|
29
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.41",
|
|
30
|
+
"@owlmeans/resource": "^0.1.18-rc.40",
|
|
31
|
+
"@owlmeans/test": "^0.1.18-rc.35"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@owlmeans/dep-config": "workspace:*",
|
package/src/consts.local.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { AuthroizationType } from '@owlmeans/auth'
|
|
2
|
+
|
|
1
3
|
export const TRUSTED_DEFAULT_ALIAS = 'TRUSTED'
|
|
2
4
|
|
|
3
5
|
/** The fields a `trust()` lookup keys on — the only index this map has. */
|
|
4
6
|
export const SUPPORTED_FIELDS = ['id', 'name']
|
|
7
|
+
|
|
8
|
+
/** The scheme word of an `Authorization` header carrying an Ed25519 basic token. */
|
|
9
|
+
export const AUTH_BEARER_PREFIX = AuthroizationType.Ed25519BasicToken.toUpperCase()
|
package/src/envelope.ts
CHANGED
|
@@ -3,8 +3,7 @@ import type { KeyPairModel } from '@owlmeans/basic-keys'
|
|
|
3
3
|
import { AuthroizationType } from '@owlmeans/auth'
|
|
4
4
|
import type { Auth } from '@owlmeans/auth'
|
|
5
5
|
import { makeFixtureKeyPair } from './keys.js'
|
|
6
|
-
|
|
7
|
-
const AUTH_BEARER_PREFIX = AuthroizationType.Ed25519BasicToken.toUpperCase()
|
|
6
|
+
import { AUTH_BEARER_PREFIX } from './consts.local.js'
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Wrap a payload in a signed `EnvelopeModel` using a fixture keypair (or one
|
package/src/guard.ts
CHANGED
|
@@ -43,7 +43,7 @@ export const makeMockGuard = (opts: MockGuardOptions = {}): GuardService => {
|
|
|
43
43
|
* Returns the same context for chaining. Existing guards under the same
|
|
44
44
|
* alias are not replaced — register before any real guard service.
|
|
45
45
|
*/
|
|
46
|
-
export const
|
|
46
|
+
export const appendMockGuard = <C extends BasicConfig, T extends BasicContext<C>>(
|
|
47
47
|
context: T,
|
|
48
48
|
auth: Auth,
|
|
49
49
|
alias: string = DEFAULT_GUARD
|