@quatrain/auth 1.1.13 → 1.1.15

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.
@@ -16,6 +16,7 @@ export declare abstract class AbstractAuthAdapter implements AuthInterface {
16
16
  abstract update(user: User, updatable: any): Promise<any>;
17
17
  abstract delete(user: User): Promise<any>;
18
18
  abstract getAuthToken(token: string): any;
19
+ abstract refreshToken(refreshToken: string): Promise<any>;
19
20
  abstract revokeAuthToken(token: string): any;
20
21
  abstract setCustomUserClaims(id: string, claims: any): any;
21
22
  }
@@ -6,7 +6,7 @@ class AbstractAuthAdapter {
6
6
  constructor(params = {}) {
7
7
  this._alias = '';
8
8
  this._params = {};
9
- this._alias = params.alias || '';
9
+ this._params = params;
10
10
  }
11
11
  setParam(key, value) {
12
12
  this._params[key] = value;
package/lib/Auth.js CHANGED
@@ -24,7 +24,7 @@ class Auth extends core_1.Core {
24
24
  }
25
25
  }
26
26
  static log(message, src = 'Auth') {
27
- super.log(message, this.name);
27
+ super.log(message, src);
28
28
  }
29
29
  }
30
30
  exports.Auth = Auth;
@@ -1,5 +1,5 @@
1
1
  import { AuthAction } from '../Auth';
2
- import { User } from '@quatrain/core';
2
+ import { User } from '@quatrain/backend';
3
3
  export default interface AuthMiddleware {
4
4
  execute: (user: User, action: AuthAction) => void;
5
5
  }
@@ -6,4 +6,5 @@ export interface AuthInterface {
6
6
  update(user: User, updatable: any): Promise<any>;
7
7
  delete(user: User): Promise<any>;
8
8
  getAuthToken(token: string): any;
9
+ refreshToken(refreshToken: string): Promise<any>;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/auth",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "license": "MIT",
5
5
  "description": "Auth adapters commons",
6
6
  "main": "lib/index.js",
@@ -11,7 +11,8 @@
11
11
  ],
12
12
  "author": "Quatrain Développement SAS <developers@quatrain.com>",
13
13
  "dependencies": {
14
- "@quatrain/core": "^1.1.10"
14
+ "@quatrain/backend": "^1.1.12",
15
+ "@quatrain/core": "^1.1.12"
15
16
  },
16
17
  "devDependencies": {
17
18
  "@tsconfig/recommended": "^1.0.1",
@@ -31,9 +32,9 @@
31
32
  "wbuild": "tsc --watch",
32
33
  "bump-to": "yarn version",
33
34
  "hash": "node ../../bin/hashFolder.js",
34
- "hash_persist": "yarn hash > .hash_latest.txt",
35
- "hash_compare": "yarn hash > .hash_newest.txt && cmp -s .hash_latest.txt .hash_newest.txt",
36
- "publish": "yarn hash_compare || yarn publish_process",
37
- "publish_process": "yarn version patch && yarn build && yarn npm publish --access public && yarn hash_persist"
35
+ "hash:persist": "yarn hash > .hash_latest.txt",
36
+ "hash:compare": "yarn hash > .hash_newest.txt && cmp -s .hash_latest.txt .hash_newest.txt",
37
+ "publish": "yarn hash:compare || yarn publish:process",
38
+ "publish:process": "yarn version patch && yarn build && yarn npm publish --access public && yarn hash:persist"
38
39
  }
39
40
  }