@owlmeans/auth-common 0.1.18-rc.12 → 0.1.18-rc.13
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/auth-common/SKILL.md +110 -21
- package/build/consts.d.ts +9 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +9 -0
- package/build/consts.js.map +1 -1
- package/build/entity.d.ts.map +1 -1
- package/build/guards/basic-ed25519/service.d.ts.map +1 -1
- package/build/utils/header.d.ts.map +1 -1
- package/build/utils/header.js.map +1 -1
- package/build/utils/trusted.d.ts.map +1 -1
- package/build/utils/trusted.js.map +1 -1
- package/package.json +11 -11
- package/src/consts.ts +10 -0
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Predefined authentication entrypoints, guards, and constants shared between serv
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/auth-common
|
|
15
|
+
bun add @owlmeans/auth-common@^0.1.18-rc.12
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -84,7 +84,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
84
84
|
your project's skill store (`.agents/skills/`):
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
|
-
npx @owlmeans/agent-skills
|
|
87
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.12
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
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/auth-common",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.13",
|
|
5
|
+
"generatedAt": "2026-09-04T22:43:25.439Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: auth-common
|
|
3
|
-
description: How to use @owlmeans/auth-common —
|
|
3
|
+
description: How to use @owlmeans/auth-common — the auth vocabulary both sides of the wire share, covering guard aliases (DEFAULT_GUARD, GUARD_ED25519), the shared auth entrypoint list, the Ed25519 signature guard, the TRUSTED-record trust() helper, and the organization-entity resolver contract (ENTITY_RESOLVER, entityKeyOf, attachEntity). Auto-invoked when importing guard constants, the shared auth entrypoints, or entity-resolution helpers.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,46 +8,135 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/auth-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/auth-common": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/auth-common": "^0.1.18-rc.13"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
Everything a server and a browser must agree on to talk authentication: aliases, the shared
|
|
14
|
+
entrypoint declarations, the signature guard, and the contract for resolving the organization
|
|
15
|
+
entity a token names.
|
|
12
16
|
|
|
13
17
|
## Key Exports
|
|
14
18
|
|
|
19
|
+
### Aliases and constants
|
|
20
|
+
|
|
21
|
+
| Export | Value / description |
|
|
22
|
+
|--------|---------------------|
|
|
23
|
+
| `DEF_AUTH_SRV` / `DEFAULT_GUARD` | `'auth'` — the canonical auth guard alias, the same string on both sides |
|
|
24
|
+
| `GUARD_ED25519` | `'guard:ed25519-basic-signature'` — the Ed25519 request-signature guard |
|
|
25
|
+
| `TOKEN_UPDATE` | `'auth-token-refresh'` |
|
|
26
|
+
| `WEB_API` | `'web-auth-api'` — service alias of the auth manager's web API |
|
|
27
|
+
| `DISPATCHER_PATH` / `SURROGATE_PATH` | `'/dispatcher'` / `'/surrogate'` — both reserved; an application must never declare its own route at either |
|
|
28
|
+
| `ENTITY_RESOLVER` | `'entity-resolver'` — the organization-entity resolver's service alias |
|
|
29
|
+
| `ENTITY_SLUG_PATTERN` | A lowercase DNS label. Slugs compose hostnames, cluster object names and OIDC client ids, so anything needing sanitising is rejected where it is chosen |
|
|
30
|
+
| `RELY_PIN_PERFIX`, `RELY_TOKEN_PREFIX`, `RELY_CALL_TIMEOUT`, `RELY_ACTION_TIMEOUT` | Rely-handshake constants |
|
|
31
|
+
| `BED255_TIME_HEADER`, `BED255_NONCE_HEADER`, `BED255_SIG_TTL`, `BED255_CASHE_RESOURCE` | Ed25519 signature-guard headers, replay window and nonce-cache alias |
|
|
32
|
+
| `authApi` | Alias tree for the manager API entrypoints (`profile`, `entity`, `auth`) |
|
|
33
|
+
|
|
34
|
+
### Entrypoints, guard and middleware
|
|
35
|
+
|
|
36
|
+
| Export | Description |
|
|
37
|
+
|--------|-------------|
|
|
38
|
+
| `entrypoints` | The shared auth entrypoint list — `AUTHEN*`, `CAUTHEN*`, `DISPATCHER`, `DISPATCHER_SURROGATE`, `DISPATCHER_AUTHEN`. Server and client packages elevate the entries they serve |
|
|
39
|
+
| `managerEntrypoints` | The auth-manager web API entrypoints (profile → entity slug, auth delegation) |
|
|
40
|
+
| `makeBasicEd25519Guard(resource, opts?)` | The `GUARD_ED25519` guard service: signs outgoing requests as a client, verifies time/nonce/signature as a server |
|
|
41
|
+
| `authMiddleware` | Loading-stage context middleware that attaches the guard's token to every guarded backend entrypoint's `invoke`/`call` |
|
|
42
|
+
| `SurrogateQuery`, `SurrogateQuerySchema` | The surrogate window's `intent` / `next` / `method` query |
|
|
43
|
+
|
|
44
|
+
### Types
|
|
45
|
+
|
|
46
|
+
| Type | Description |
|
|
47
|
+
|------|-------------|
|
|
48
|
+
| `AuthService` | `GuardService` + `authenticate(token)`, `update(token)`, `user()`, `store<T>()` — the client-side auth manager contract |
|
|
49
|
+
| `AuthorizationService` | `isAllowed(permissions, token?, thr?)`, `update(token?, thr?)` |
|
|
50
|
+
| `TrustedRecord` | A `ConfigRecord` carrying a known signing identity's `name`, `credential` (public key) and optional `secret` |
|
|
51
|
+
| `AuthRequest` | An `AbstractRequest` whose `query` is an `AuthToken` |
|
|
52
|
+
| `AuthUIParams` | `{ type? }` — the typed login route's params |
|
|
53
|
+
| `OrgEntityRef` | `{ id, slug, formerSlugs?, iamKey }` |
|
|
54
|
+
| `EntityResolverService` | `resolve`, `byId`, `mintSlug`, `rename`, `mintName` — see below |
|
|
55
|
+
| `ProfileToEntityIdRequest` / `ProfileToEntityIdResponse` | The manager API body/response that maps a `profileId` to an `entitySlug` |
|
|
56
|
+
|
|
57
|
+
### Subpath `./utils`
|
|
58
|
+
|
|
15
59
|
| Export | Description |
|
|
16
60
|
|--------|-------------|
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| Auth modules | Shared module declarations registered in both server and client |
|
|
21
|
-
| Middleware | Cross-side auth middleware helpers |
|
|
61
|
+
| `trust(context, resource, userName, field = 'name')` | Load a `TrustedRecord` from a config resource and return `{ user, key }`, where `key` is a signing `KeyPairModel` when the record has a `secret` and a verify-only one otherwise |
|
|
62
|
+
| `extractAuthToken(req, type?, onlyValue?)` | Pull the `authorization` header, optionally requiring an `AuthroizationType` prefix |
|
|
63
|
+
| `Config`, `Context` | The minimal context shape `trust` needs |
|
|
22
64
|
|
|
23
|
-
##
|
|
65
|
+
## The organization entity
|
|
24
66
|
|
|
25
|
-
|
|
67
|
+
The customer organization is an **organization entity**. Two values name it and they are not
|
|
68
|
+
interchangeable:
|
|
69
|
+
|
|
70
|
+
- **`entitySlug`** — renameable, human-readable, and the only organization value on the wire. It is
|
|
71
|
+
what a token, a URL, a query param and a form carry.
|
|
72
|
+
- **`entityId`** — the stable record id. It never travels; it is what database rows, permission
|
|
73
|
+
grants and third-party records key on, and it is why a rename costs one write.
|
|
74
|
+
|
|
75
|
+
`EntityResolverService` is the contract between the two. It is registered **only** by an
|
|
76
|
+
implementation that actually stores organizations (`@owlmeans/server-auth-identity` registers one);
|
|
77
|
+
a deployment backed by an external IAM registers none, and every consumer must treat an unresolved
|
|
78
|
+
entity as ordinary rather than exceptional.
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import { attachEntity, entityKeyOf, requireEntityKey, requireEntity } from '@owlmeans/auth-common'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
| Helper | What it answers |
|
|
85
|
+
|--------|-----------------|
|
|
86
|
+
| `attachEntity(context, request)` | Resolve the slug on `request.auth` and set `request.entity`, canonicalizing a retired slug to the current one. A no-op when no resolver is registered; throws `AuthenFailed('entity')` when the token names an organization that will not resolve |
|
|
87
|
+
| `entityKeyOf(req)` | The value to store and query organization-scoped records by — `req.entity?.id`, falling back to the token's slug where no resolver exists |
|
|
88
|
+
| `requireEntityKey(req)` | Same, throwing `AuthorizationError` when the request carries no organization |
|
|
89
|
+
| `requireEntity(req)` | The full `ResolvedEntity` (`id`, `slug`, `iamKey`), throwing `AuthorizationError` when nothing resolved |
|
|
90
|
+
|
|
91
|
+
`attachEntity` must be called wherever authentication is **established** — the HTTP boundary, and
|
|
92
|
+
any socket that authenticates after its connection is already open. A path that authenticates
|
|
93
|
+
without it leaves `request.entity` empty and its handlers silently compare a slug against stored
|
|
94
|
+
ids.
|
|
95
|
+
|
|
96
|
+
Never build a user-facing name (a hostname, a display label) from `entityKeyOf`. Those want the
|
|
97
|
+
current slug, `req.entity?.slug`.
|
|
26
98
|
|
|
27
99
|
## Usage
|
|
28
100
|
|
|
29
|
-
|
|
101
|
+
Declare an entrypoint with a guard so both sides agree on the alias, and compose authorization as a
|
|
102
|
+
gate inside the same options object:
|
|
30
103
|
|
|
31
104
|
```typescript
|
|
32
105
|
import { entrypoint, guard, gate } from '@owlmeans/entrypoint'
|
|
33
|
-
import { route } from '@owlmeans/route'
|
|
106
|
+
import { route, backend } from '@owlmeans/route'
|
|
34
107
|
import { DEFAULT_GUARD } from '@owlmeans/auth-common'
|
|
35
|
-
import { OIDC_GATE } from '@owlmeans/oidc'
|
|
36
108
|
|
|
109
|
+
// PRODUCT_GATE is the consuming app's own gate alias, registered as a GateService on its context.
|
|
37
110
|
entrypoint(
|
|
38
|
-
route(
|
|
39
|
-
guard(DEFAULT_GUARD, gate(
|
|
111
|
+
route('api:account', '/account', backend()),
|
|
112
|
+
guard(DEFAULT_GUARD, gate(PRODUCT_GATE, ['my-service-account-{entity}']))
|
|
40
113
|
)
|
|
41
114
|
```
|
|
42
115
|
|
|
43
|
-
|
|
116
|
+
`{entity}` is a placeholder each **gate service** substitutes for itself — `@owlmeans/auth-common`
|
|
117
|
+
declares neither the token nor the substitution — so what it stands for depends on the gate the
|
|
118
|
+
alias resolves to. `@owlmeans/server-iam` substitutes `req.entity?.id`, falling back to the token's
|
|
119
|
+
slug, because its grants are stored against the organization entity's stable id wherever one is
|
|
120
|
+
resolvable. `@owlmeans/server-oidc-rp`'s gate model substitutes the token's slug only. Both write
|
|
121
|
+
`'-'` when neither is available. Read the gate you are wiring before writing a parameter that
|
|
122
|
+
depends on the value.
|
|
123
|
+
|
|
124
|
+
## Rules
|
|
44
125
|
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
- `
|
|
48
|
-
|
|
126
|
+
- `DEFAULT_GUARD` is the bearer-token guard shared by server and web; `@owlmeans/client-auth` exports
|
|
127
|
+
the matching client-side alias as `DEFAULT_ALIAS`.
|
|
128
|
+
- `GUARD_ED25519` is for service-to-service calls, where the caller signs the request rather than
|
|
129
|
+
presenting a bearer token. Give it a Redis-backed nonce cache (`BED255_CASHE_RESOURCE`) in any
|
|
130
|
+
deployment that runs more than one replica, or replay protection is per-process only.
|
|
131
|
+
- An OIDC gate is not required when OIDC is only the login/bootstrap provider. Where the provider
|
|
132
|
+
issues a local bearer token, authorize with a product-specific gate against local identity scopes.
|
|
133
|
+
- The trust resource (`TRUSTED`, from `@owlmeans/config`) is the system's source of truth for known
|
|
134
|
+
signing identities — the auth service, peer services, wallet providers, supervisors.
|
|
49
135
|
|
|
50
136
|
## Depends On
|
|
51
137
|
|
|
52
|
-
- `@owlmeans/auth` — types
|
|
53
|
-
- `@owlmeans/entrypoint` — entrypoint/guard/gate
|
|
138
|
+
- `@owlmeans/auth` — types, errors, entrypoint aliases
|
|
139
|
+
- `@owlmeans/entrypoint` — `entrypoint` / `guard` / `gate`, `GuardService`, `ResolvedEntity`
|
|
140
|
+
- `@owlmeans/route` — route builders for the shared entrypoint list
|
|
141
|
+
- `@owlmeans/basic-keys` — key pairs behind `trust()` and the Ed25519 guard
|
|
142
|
+
- `@owlmeans/basic-ids`, `@owlmeans/context`, `@owlmeans/resource`, `@owlmeans/client-entrypoint`
|
package/build/consts.d.ts
CHANGED
|
@@ -45,4 +45,13 @@ export declare const authApi: {
|
|
|
45
45
|
delegate: string;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* The request header an authenticated call carries, re-exported for the packages that only depend
|
|
50
|
+
* on this half of the vocabulary.
|
|
51
|
+
*
|
|
52
|
+
* One spelling, one home: it is declared by `@owlmeans/auth` and named here so a client-side
|
|
53
|
+
* package does not have to take a dependency on the whole auth package to recognise its own
|
|
54
|
+
* bearer on a request it is about to send.
|
|
55
|
+
*/
|
|
56
|
+
export { AUTH_HEADER } from '@owlmeans/auth';
|
|
48
57
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C,eAAO,MAAM,iBAAiB,gBAAgB,CAAA;AAE9C,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC,eAAO,MAAM,eAAe,gBAAgB,CAAA;AAE5C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45,13 @@ export const authApi = {
|
|
|
45
45
|
delegate: 'api:auth:delegate',
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* The request header an authenticated call carries, re-exported for the packages that only depend
|
|
50
|
+
* on this half of the vocabulary.
|
|
51
|
+
*
|
|
52
|
+
* One spelling, one home: it is declared by `@owlmeans/auth` and named here so a client-side
|
|
53
|
+
* package does not have to take a dependency on the whole auth package to recognise its own
|
|
54
|
+
* bearer on a request it is about to send.
|
|
55
|
+
*/
|
|
56
|
+
export { AUTH_HEADER } from '@owlmeans/auth';
|
|
48
57
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAA;AAE1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAA;AAE9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAEpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAA;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAA;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAA;AAEhD,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAA;AAErC,+FAA+F;AAC/F,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAA;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,wCAAwC,CAAA;AAE3E,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,OAAO,EAAE;QACP,IAAI,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ACP,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;KACF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,mBAAmB;KAC9B;CACF,CAAA;AAGD;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
|
package/build/entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,QAAS,eAAe,KAAG,MAAM,GAAG,SAClB,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAAS,eAAe,KAAG,MAOvD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAS,eAAe,KAAG,cAMpD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,YACd,YAAY,CAAC,GAAG,CAAC,WAAW,eAAe,KACnD,OAAO,CAAC,cAAc,GAAG,SAAS,CAiBpC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/guards/basic-ed25519/service.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAU7E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/guards/basic-ed25519/service.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAU7E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAc,MAAM,SAAS,wBAAwB,KAAG,iBAqHzF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/utils/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/utils/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,gBAAgB,QACtB,OAAO,CAAC,eAAe,CAAC,SACvB,MAAM,GAAG,IAAI,cACR,OAAO,KACjB,MAAM,GAAG,IAgBX,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/utils/header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAG/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/utils/header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAG/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,IAAI,GAAkB,iBAAiB,CAAC,iBAAiB,EACzD,SAAS,GAAY,IAAI,EACV,EAAE;IACjB,IAAI,aAAa,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,CAAA;IAC9C,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAA;IAE/E,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClD,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAA;IACnD,CAAC;IAED,OAAO,MAAM,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QACpC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa;QAC1C,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted.d.ts","sourceRoot":"","sources":["../../src/utils/trusted.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,KAAK,GAAU,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"trusted.d.ts","sourceRoot":"","sources":["../../src/utils/trusted.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,KAAK,GAAU,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,MAAM,YAAY,MAAM,UAAS,MAAM;;;EAWhI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted.js","sourceRoot":"","sources":["../../src/utils/trusted.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAA0C,OAAU,EAAE,QAAgB,EAAE,QAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"trusted.js","sourceRoot":"","sources":["../../src/utils/trusted.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAA0C,OAAU,EAAE,QAAgB,EAAE,QAAgB,EAAE,KAAK,GAAW,MAAM,EAAE,EAAE;IAC5I,MAAM,KAAK,GAA4B,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC5D,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,QAAQ,CAA0B,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzF,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,IAAI,WAAW,CAAC,gDAAgD,QAAQ,EAAE,CAAC,CAAA;IACnF,CAAC;IAED,4EAA4E;IAC5E,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,UAAW,CAAC,CAAA;IAEvH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAA;AAC5C,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/auth-common",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/basic-ids": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/basic-keys": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
39
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
40
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
32
|
+
"@owlmeans/auth": "^0.1.18-rc.9",
|
|
33
|
+
"@owlmeans/auth-common": "^0.1.18-rc.13",
|
|
34
|
+
"@owlmeans/basic-ids": "^0.1.18-rc.9",
|
|
35
|
+
"@owlmeans/basic-keys": "^0.1.18-rc.12",
|
|
36
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.13",
|
|
37
|
+
"@owlmeans/context": "^0.1.18-rc.8",
|
|
38
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.11",
|
|
39
|
+
"@owlmeans/resource": "^0.1.18-rc.9",
|
|
40
|
+
"@owlmeans/route": "^0.1.18-rc.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@owlmeans/dep-config": "workspace:*",
|
|
44
|
-
"@owlmeans/test-auth": "^0.1.18-rc.
|
|
44
|
+
"@owlmeans/test-auth": "^0.1.18-rc.13",
|
|
45
45
|
"@types/bun": "^1.4.0",
|
|
46
46
|
"nodemon": "^3.1.14",
|
|
47
47
|
"typescript": "^7.0.2"
|
package/src/consts.ts
CHANGED
|
@@ -58,3 +58,13 @@ export const authApi = {
|
|
|
58
58
|
},
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The request header an authenticated call carries, re-exported for the packages that only depend
|
|
64
|
+
* on this half of the vocabulary.
|
|
65
|
+
*
|
|
66
|
+
* One spelling, one home: it is declared by `@owlmeans/auth` and named here so a client-side
|
|
67
|
+
* package does not have to take a dependency on the whole auth package to recognise its own
|
|
68
|
+
* bearer on a request it is about to send.
|
|
69
|
+
*/
|
|
70
|
+
export { AUTH_HEADER } from '@owlmeans/auth'
|