@gapi/auth 1.8.169 → 1.8.170
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/dist/auth.service.js +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -6
- package/eslint.config.mjs +38 -0
- package/package.json +4 -4
- package/src/auth.config.ts +1 -1
- package/src/auth.service.ts +2 -2
- package/src/index.ts +1 -1
package/dist/auth.service.js
CHANGED
|
@@ -23,16 +23,16 @@ let AuthInternalService = class AuthInternalService {
|
|
|
23
23
|
this.config = config;
|
|
24
24
|
}
|
|
25
25
|
verifyToken(token) {
|
|
26
|
-
return jsonwebtoken_1.verify(token, this.config.cert, { algorithm: 'HS256' });
|
|
26
|
+
return (0, jsonwebtoken_1.verify)(token, this.config.cert, { algorithm: 'HS256' });
|
|
27
27
|
}
|
|
28
28
|
decrypt(password) {
|
|
29
|
-
const decipher = crypto_1.createDecipheriv(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
|
|
29
|
+
const decipher = (0, crypto_1.createDecipheriv)(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
|
|
30
30
|
let dec = decipher.update(password, 'hex', 'utf8');
|
|
31
31
|
dec += decipher.final('utf8');
|
|
32
32
|
return dec;
|
|
33
33
|
}
|
|
34
34
|
encrypt(password) {
|
|
35
|
-
const cipher = crypto_1.createCipheriv(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
|
|
35
|
+
const cipher = (0, crypto_1.createCipheriv)(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
|
|
36
36
|
let crypted = cipher.update(password, 'utf8', 'hex');
|
|
37
37
|
crypted += cipher.final('hex');
|
|
38
38
|
return crypted;
|
|
@@ -47,14 +47,14 @@ let AuthInternalService = class AuthInternalService {
|
|
|
47
47
|
callback(null, true, token);
|
|
48
48
|
}
|
|
49
49
|
sign(tokenData) {
|
|
50
|
-
return jsonwebtoken_1.sign(tokenData, this.config.cert, {
|
|
50
|
+
return (0, jsonwebtoken_1.sign)(tokenData, this.config.cert, {
|
|
51
51
|
algorithm: this.config.algorithm,
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
AuthInternalService =
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
exports.AuthInternalService = AuthInternalService;
|
|
56
|
+
exports.AuthInternalService = AuthInternalService = __decorate([
|
|
57
|
+
(0, core_1.Service)(),
|
|
58
|
+
__param(0, (0, core_1.Inject)(auth_config_1.AUTH_MODULE_CONFIG)),
|
|
58
59
|
__metadata("design:paramtypes", [Object])
|
|
59
60
|
], AuthInternalService);
|
|
60
|
-
exports.AuthInternalService = AuthInternalService;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -13,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
17
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
18
|
};
|
|
15
19
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
21
|
};
|
|
18
22
|
var AuthModule_1;
|
|
19
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -35,9 +39,9 @@ let AuthModule = AuthModule_1 = class AuthModule {
|
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
|
-
AuthModule = AuthModule_1 = __decorate([
|
|
39
|
-
core_1.Module()
|
|
40
|
-
], AuthModule);
|
|
41
42
|
exports.AuthModule = AuthModule;
|
|
42
|
-
|
|
43
|
+
exports.AuthModule = AuthModule = AuthModule_1 = __decorate([
|
|
44
|
+
(0, core_1.Module)()
|
|
45
|
+
], AuthModule);
|
|
43
46
|
__exportStar(require("./auth.config"), exports);
|
|
47
|
+
__exportStar(require("./auth.service"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
2
|
+
import tsParser from '@typescript-eslint/parser';
|
|
3
|
+
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
4
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
5
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
globalIgnores(["dist/*"]),
|
|
10
|
+
{
|
|
11
|
+
files: ['./src/**/*.ts', './src/**/*.tsx'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
parser: tsParser,
|
|
14
|
+
ecmaVersion: 2018,
|
|
15
|
+
sourceType: 'module',
|
|
16
|
+
},
|
|
17
|
+
plugins: {
|
|
18
|
+
'@typescript-eslint': tsPlugin,
|
|
19
|
+
prettier: prettierPlugin,
|
|
20
|
+
'simple-import-sort': simpleImportSort, // ✅ MUST MATCH RULE PREFIX
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
...tsPlugin.configs.recommended.rules,
|
|
24
|
+
...prettierConfig.rules,
|
|
25
|
+
|
|
26
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
27
|
+
'@typescript-eslint/camelcase': 'off',
|
|
28
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
29
|
+
|
|
30
|
+
'simple-import-sort/imports': 'error',
|
|
31
|
+
'simple-import-sort/exports': 'error',
|
|
32
|
+
'sort-imports': 'off',
|
|
33
|
+
'import/order': 'off',
|
|
34
|
+
|
|
35
|
+
'prettier/prettier': 'error',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gapi/auth",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.170",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Stradivario/gapi-auth"
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"moment": "^2.22.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@rxdi/core": "^0.7.
|
|
40
|
-
"@types/node": "^
|
|
41
|
-
"typescript": "^
|
|
39
|
+
"@rxdi/core": "^0.7.194",
|
|
40
|
+
"@types/node": "^25.0.3",
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/auth.config.ts
CHANGED
package/src/auth.service.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class AuthInternalService {
|
|
|
17
17
|
const decipher = createDecipheriv(
|
|
18
18
|
this.config.cyper.algorithm,
|
|
19
19
|
this.config.cyper.privateKey,
|
|
20
|
-
this.config.cyper.iv
|
|
20
|
+
this.config.cyper.iv,
|
|
21
21
|
);
|
|
22
22
|
let dec = decipher.update(password, 'hex', 'utf8');
|
|
23
23
|
dec += decipher.final('utf8');
|
|
@@ -28,7 +28,7 @@ export class AuthInternalService {
|
|
|
28
28
|
const cipher = createCipheriv(
|
|
29
29
|
this.config.cyper.algorithm,
|
|
30
30
|
this.config.cyper.privateKey,
|
|
31
|
-
this.config.cyper.iv
|
|
31
|
+
this.config.cyper.iv,
|
|
32
32
|
);
|
|
33
33
|
let crypted = cipher.update(password, 'utf8', 'hex');
|
|
34
34
|
crypted += cipher.final('hex');
|