@travetto/auth-model 4.1.2 → 5.0.0-rc.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/model.ts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/auth-model",
3
- "version": "4.1.2",
3
+ "version": "5.0.0-rc.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": "^4.1.0",
29
- "@travetto/model": "^4.1.2"
28
+ "@travetto/auth": "^5.0.0-rc.0",
29
+ "@travetto/model": "^5.0.0-rc.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@travetto/test": "^4.1.0"
32
+ "@travetto/test": "^5.0.0-rc.0"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/test": {
package/src/model.ts CHANGED
@@ -34,8 +34,7 @@ export interface RegisteredPrincipal extends Principal {
34
34
  */
35
35
  export class ModelAuthService<T extends ModelType> implements
36
36
  Authenticator<T, RegisteredPrincipal>,
37
- Authorizer<RegisteredPrincipal>
38
- {
37
+ Authorizer<RegisteredPrincipal> {
39
38
 
40
39
  #modelService: ModelCrudSupport;
41
40
  #cls: Class<T>;
@@ -163,7 +162,7 @@ export class ModelAuthService<T extends ModelType> implements
163
162
  const salt = await Util.uuid();
164
163
 
165
164
  ident.resetToken = await AuthUtil.generateHash(Util.uuid(), salt, 25000, 32);
166
- ident.resetExpires = TimeUtil.timeFromNow('1h');
165
+ ident.resetExpires = TimeUtil.fromNow(1, 'h');
167
166
 
168
167
  Object.assign(user, this.fromPrincipal(ident));
169
168