@ddd-ts-kit/auth 0.3.0 → 0.4.0
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 +6 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -33,6 +33,12 @@ Nothing is reachable by default. A command or a query that declares neither a pe
|
|
|
33
33
|
that it is public is refused, at run time by the middleware and, when you ask for it, when the
|
|
34
34
|
application is created.
|
|
35
35
|
|
|
36
|
+
Guards are not a fourth place. A guard of `@ddd-ts-kit/http` (`Authenticated`, `HasRole(..)`, a
|
|
37
|
+
guard of the project) is a control at the edge over a set of routes: it reads the caller and
|
|
38
|
+
the request, and refuses before the controller runs. It never replaces the permission of a use
|
|
39
|
+
case, which a job, an event handler or another transport meets without passing any guard, and
|
|
40
|
+
it never loads an element to decide. The rule is `presentation/guard-at-the-edge`.
|
|
41
|
+
|
|
36
42
|
## A complete example
|
|
37
43
|
|
|
38
44
|
### 1. Permissions, declared by the context that owns them
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Authentication and authorization behind ports: actors, permissions declared per use case, role, attribute and relationship (Zanzibar-style) based authorizers, deny by default.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ddd-ts-kit/kernel": "0.
|
|
45
|
+
"@ddd-ts-kit/kernel": "0.4.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@ddd-ts-kit/di": "0.
|
|
49
|
-
"@ddd-ts-kit/testing": "0.
|
|
48
|
+
"@ddd-ts-kit/di": "0.4.0",
|
|
49
|
+
"@ddd-ts-kit/testing": "0.4.0",
|
|
50
50
|
"jose": "^6.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@ddd-ts-kit/di": "0.
|
|
65
|
-
"@ddd-ts-kit/http": "0.
|
|
66
|
-
"@ddd-ts-kit/testing": "0.
|
|
64
|
+
"@ddd-ts-kit/di": "0.4.0",
|
|
65
|
+
"@ddd-ts-kit/http": "0.4.0",
|
|
66
|
+
"@ddd-ts-kit/testing": "0.4.0",
|
|
67
67
|
"jose": "^6.0.0"
|
|
68
68
|
}
|
|
69
69
|
}
|