@travetto/auth-model 5.0.0-rc.9 → 5.0.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 +2 -0
- package/package.json +4 -4
- package/support/test/model.ts +2 -2
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ Currently, the following are packages that provide [CRUD](https://github.com/tra
|
|
|
35
35
|
* [MySQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-mysql#readme "MySQL backing for the travetto model module, with real-time modeling support for SQL schemas.") - @travetto/model-mysql
|
|
36
36
|
* [PostgreSQL Model Service](https://github.com/travetto/travetto/tree/main/module/model-postgres#readme "PostgreSQL backing for the travetto model module, with real-time modeling support for SQL schemas.") - @travetto/model-postgres
|
|
37
37
|
* [SQLite Model Service](https://github.com/travetto/travetto/tree/main/module/model-sqlite#readme "SQLite backing for the travetto model module, with real-time modeling support for SQL schemas.") - @travetto/model-sqlite
|
|
38
|
+
* [Memory Model Support](https://github.com/travetto/travetto/tree/main/module/model-memory#readme "Memory backing for the travetto model module.") - @travetto/model-memory
|
|
39
|
+
* [File Model Support](https://github.com/travetto/travetto/tree/main/module/model-file#readme "File system backing for the travetto model module.") - @travetto/model-file
|
|
38
40
|
The module itself is fairly straightforward, and truly the only integration point for this module to work is defined at the model level. The contract for authentication is established in code as providing translation to and from a [Registered Principal](https://github.com/travetto/travetto/tree/main/module/auth-model/src/model.ts#L9).
|
|
39
41
|
|
|
40
42
|
A registered principal extends the base concept of an principal, by adding in additional fields needed for local registration, specifically password management information.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/auth-model",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Authentication model support for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"directory": "module/auth-model"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@travetto/auth": "^5.0.0
|
|
29
|
-
"@travetto/model": "^5.0.0
|
|
28
|
+
"@travetto/auth": "^5.0.0",
|
|
29
|
+
"@travetto/model": "^5.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@travetto/test": "^5.0.0
|
|
32
|
+
"@travetto/test": "^5.0.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@travetto/test": {
|
package/support/test/model.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
|
|
3
|
-
import { AppError, Class } from '@travetto/runtime';
|
|
3
|
+
import { AppError, castTo, Class } from '@travetto/runtime';
|
|
4
4
|
import { Suite, Test } from '@travetto/test';
|
|
5
5
|
import { Inject, InjectableFactory } from '@travetto/di';
|
|
6
6
|
import { ModelCrudSupport, Model } from '@travetto/model';
|
|
@@ -29,7 +29,7 @@ class TestConfig {
|
|
|
29
29
|
const src = new ModelAuthService<User>(
|
|
30
30
|
svc,
|
|
31
31
|
User,
|
|
32
|
-
u => ({ ...u, details: u, source: 'model' }),
|
|
32
|
+
u => castTo({ ...u, details: u, source: 'model' }),
|
|
33
33
|
reg => User.from({ ...reg })
|
|
34
34
|
);
|
|
35
35
|
return src;
|