@owlmeans/auth-common 0.1.7 → 0.1.8
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
CHANGED
|
@@ -75,3 +75,20 @@ BED255_CASHE_RESOURCE // resource alias for nonce cache
|
|
|
75
75
|
- [`@owlmeans/auth`](../auth) — auth type definitions and schemas
|
|
76
76
|
- [`@owlmeans/server-auth`](../server-auth) — server guard implementation
|
|
77
77
|
- [`@owlmeans/client-auth`](../client-auth) — client auth service
|
|
78
|
+
|
|
79
|
+
<!-- owlmeans:agent-guidance:start -->
|
|
80
|
+
## Agent guidance
|
|
81
|
+
|
|
82
|
+
This package ships embedded Claude Code skills and GitHub Copilot instructions under
|
|
83
|
+
`agent-meta/`. After installing your `@owlmeans/*` packages, run the OwlMeans
|
|
84
|
+
agent-skills installer to place them into your project's native locations
|
|
85
|
+
(`.claude/skills/` and `.github/instructions/`):
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npx @owlmeans/agent-skills
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The embedded files are version-matched to this package release. Do not edit them
|
|
92
|
+
directly — they are regenerated on each publish. To contribute guidance edits,
|
|
93
|
+
open a PR against the source monorepo.
|
|
94
|
+
<!-- owlmeans:agent-guidance:end -->
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "How to use @owlmeans/auth-common — shared authentication guard aliases (DEFAULT_GUARD, GUARD_ED25519) and middleware shared between server and client. Use when declaring modules with guards."
|
|
3
|
+
applyTo: "**/*.ts, **/*.tsx"
|
|
4
|
+
---
|
|
5
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
6
|
+
|
|
7
|
+
# @owlmeans/auth-common
|
|
8
|
+
|
|
9
|
+
**Layer:** Core
|
|
10
|
+
**Install:** `"@owlmeans/auth-common": "^0.1.8"` in `dependencies`
|
|
11
|
+
|
|
12
|
+
## Key Exports
|
|
13
|
+
|
|
14
|
+
| Export | Description |
|
|
15
|
+
|--------|-------------|
|
|
16
|
+
| `DEFAULT_GUARD` | Alias for the default authentication guard |
|
|
17
|
+
| `GUARD_ED25519` | Alias for the Ed25519 signature guard |
|
|
18
|
+
| `AUTH_API` | Alias of the auth service module group |
|
|
19
|
+
| Auth modules | Shared module declarations registered in both server and client |
|
|
20
|
+
| Middleware | Cross-side auth middleware helpers |
|
|
21
|
+
|
|
22
|
+
## Subpath Exports
|
|
23
|
+
|
|
24
|
+
- `./utils` — shared auth utility functions
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { entrypoint, guard, gate } from '@owlmeans/entrypoint'
|
|
30
|
+
import { route } from '@owlmeans/route'
|
|
31
|
+
import { DEFAULT_GUARD } from '@owlmeans/auth-common'
|
|
32
|
+
import { OIDC_GATE } from '@owlmeans/oidc'
|
|
33
|
+
|
|
34
|
+
entrypoint(
|
|
35
|
+
route(manager.back.account.base, '/account'),
|
|
36
|
+
guard(DEFAULT_GUARD, gate(OIDC_GATE, [`my-service-account-{entity}`]))
|
|
37
|
+
)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Product-Viable Usage Notes
|
|
41
|
+
|
|
42
|
+
- Manager API modules use `DEFAULT_GUARD` for bearer-token authentication and compose product authorization with `gate(VIABLE_AUTH_GATE, [...])` inside the same `guard(...)` options object.
|
|
43
|
+
- Internal service-to-service routes still use `GUARD_ED25519`, including publisher/project command paths and auth service helper modules.
|
|
44
|
+
- `DEFAULT_GUARD` is the guard alias shared across server and web; `@owlmeans/client-auth` exports the matching client alias.
|
|
45
|
+
- Do not assume OIDC gates are required when OIDC is only the login/bootstrap provider. In product-viable, OIDC/Google login issues local bearer auth, and a product-specific gate checks local identity scopes.
|
|
46
|
+
|
|
47
|
+
## Depends On
|
|
48
|
+
|
|
49
|
+
- `@owlmeans/auth` — types and errors
|
|
50
|
+
- `@owlmeans/entrypoint` — entrypoint/guard/gate helpers
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@owlmeans/auth-common",
|
|
4
|
+
"version": "0.1.8",
|
|
5
|
+
"generatedAt": "2026-06-11T16:30:27.165Z",
|
|
6
|
+
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
|
+
"entries": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "skill",
|
|
10
|
+
"name": "auth-common",
|
|
11
|
+
"category": "package-specific",
|
|
12
|
+
"file": "skills/auth-common/SKILL.md",
|
|
13
|
+
"canonicalPath": ".claude/skills/auth-common/SKILL.md"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"kind": "instruction",
|
|
17
|
+
"name": "auth-common",
|
|
18
|
+
"category": "package-specific",
|
|
19
|
+
"file": "instructions/auth-common.instructions.md",
|
|
20
|
+
"canonicalPath": ".github/instructions/auth-common.instructions.md"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auth-common
|
|
3
|
+
description: How to use @owlmeans/auth-common — shared authentication guard aliases (DEFAULT_GUARD, GUARD_ED25519) and middleware shared between server and client. Auto-invoked when importing guard constants or shared auth modules.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
7
|
+
|
|
8
|
+
# @owlmeans/auth-common
|
|
9
|
+
|
|
10
|
+
**Layer:** Core
|
|
11
|
+
**Install:** `"@owlmeans/auth-common": "^0.1.8"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
## Key Exports
|
|
14
|
+
|
|
15
|
+
| Export | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `DEFAULT_GUARD` | Alias for the default authentication guard |
|
|
18
|
+
| `GUARD_ED25519` | Alias for the Ed25519 signature guard |
|
|
19
|
+
| `AUTH_API` | Alias of the auth service module group |
|
|
20
|
+
| Auth modules | Shared module declarations registered in both server and client |
|
|
21
|
+
| Middleware | Cross-side auth middleware helpers |
|
|
22
|
+
|
|
23
|
+
## Subpath Exports
|
|
24
|
+
|
|
25
|
+
- `./utils` — shared auth utility functions
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
Use guard aliases when declaring modules so both client and server agree on the guard name:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { entrypoint, guard, gate } from '@owlmeans/entrypoint'
|
|
33
|
+
import { route } from '@owlmeans/route'
|
|
34
|
+
import { DEFAULT_GUARD } from '@owlmeans/auth-common'
|
|
35
|
+
import { OIDC_GATE } from '@owlmeans/oidc'
|
|
36
|
+
|
|
37
|
+
entrypoint(
|
|
38
|
+
route(manager.back.account.base, '/account'),
|
|
39
|
+
guard(DEFAULT_GUARD, gate(OIDC_GATE, [`my-service-account-{entity}`]))
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Product-Viable Usage Notes
|
|
44
|
+
|
|
45
|
+
- Manager API modules use `DEFAULT_GUARD` for bearer-token authentication and compose product authorization with `gate(VIABLE_AUTH_GATE, [...])` inside the same `guard(...)` options object.
|
|
46
|
+
- Internal service-to-service routes still use `GUARD_ED25519`, including publisher/project command paths and auth service helper modules.
|
|
47
|
+
- `DEFAULT_GUARD` is the guard alias shared across server and web; `@owlmeans/client-auth` exports the matching client alias.
|
|
48
|
+
- OIDC gates are not required when OIDC is only the login/bootstrap provider. In product-viable, OIDC/Google login issues local bearer auth, and a product-specific gate checks local identity scopes.
|
|
49
|
+
|
|
50
|
+
## Depends On
|
|
51
|
+
|
|
52
|
+
- `@owlmeans/auth` — types and errors
|
|
53
|
+
- `@owlmeans/entrypoint` — entrypoint/guard/gate helpers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/auth-common",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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.
|
|
33
|
-
"@owlmeans/auth-common": "^0.1.
|
|
34
|
-
"@owlmeans/basic-ids": "^0.1.
|
|
35
|
-
"@owlmeans/basic-keys": "^0.1.
|
|
36
|
-
"@owlmeans/client-entrypoint": "^0.1.
|
|
37
|
-
"@owlmeans/context": "^0.1.
|
|
38
|
-
"@owlmeans/entrypoint": "^0.1.
|
|
39
|
-
"@owlmeans/resource": "^0.1.
|
|
40
|
-
"@owlmeans/route": "^0.1.
|
|
32
|
+
"@owlmeans/auth": "^0.1.8",
|
|
33
|
+
"@owlmeans/auth-common": "^0.1.8",
|
|
34
|
+
"@owlmeans/basic-ids": "^0.1.8",
|
|
35
|
+
"@owlmeans/basic-keys": "^0.1.8",
|
|
36
|
+
"@owlmeans/client-entrypoint": "^0.1.8",
|
|
37
|
+
"@owlmeans/context": "^0.1.8",
|
|
38
|
+
"@owlmeans/entrypoint": "^0.1.8",
|
|
39
|
+
"@owlmeans/resource": "^0.1.8",
|
|
40
|
+
"@owlmeans/route": "^0.1.8"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@owlmeans/dep-config": "workspace:*",
|
|
44
|
-
"@owlmeans/test-auth": "^0.1.
|
|
44
|
+
"@owlmeans/test-auth": "^0.1.8",
|
|
45
45
|
"@types/bun": "^1.3.0",
|
|
46
46
|
"nodemon": "^3.1.11",
|
|
47
47
|
"npm-check": "^6.0.1",
|