@hemia/auth-sdk 0.0.5 → 0.0.7

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.
@@ -1,4 +1,3 @@
1
- import 'reflect-metadata';
2
1
  import { BadRequestError, CustomHttpError, InternalServerError, Get, Req, Res, Post, HttpError } from '@hemia/common';
3
2
  import { HMNetworkServices } from '@hemia/network-services';
4
3
  import { JwtManager } from '@hemia/jwt-manager';
@@ -122,15 +121,11 @@ class InvalidTokenFormatError extends SessionError {
122
121
  }
123
122
 
124
123
  let AuthService = class AuthService {
125
- // private networkServices: HMNetworkServices;
126
- // private jwtManager: JwtManager
127
124
  constructor(config, storage, networkServices, jwtManager) {
128
125
  this.config = config;
129
126
  this.storage = storage;
130
127
  this.networkServices = networkServices;
131
128
  this.jwtManager = jwtManager;
132
- // this.networkServices = new HMNetworkServices(this.config.ssoBaseUrl);
133
- // this.jwtManager = new JwtManager();
134
129
  }
135
130
  /**
136
131
  * Genera los parámetros necesarios para iniciar el login SSO
@@ -318,7 +313,7 @@ AuthService = __decorate([
318
313
  JwtManager])
319
314
  ], AuthService);
320
315
 
321
- const AUTH_SERVICE_ID = 'AuthService';
316
+ const AUTH_SERVICE_ID = Symbol.for('HemiaAuthService');
322
317
 
323
318
  /**
324
319
  * Controller Abstracto Reutilizable
@@ -448,8 +443,6 @@ __decorate([
448
443
  ], AbstractAuthController.prototype, "authService", void 0);
449
444
  __decorate([
450
445
  Get('/login'),
451
- __param(0, Req()),
452
- __param(1, Res()),
453
446
  __metadata("design:type", Function),
454
447
  __metadata("design:paramtypes", [Object, Object]),
455
448
  __metadata("design:returntype", Promise)
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- require('reflect-metadata');
4
3
  var common = require('@hemia/common');
5
4
  var networkServices = require('@hemia/network-services');
6
5
  var jwtManager = require('@hemia/jwt-manager');
@@ -124,15 +123,11 @@ class InvalidTokenFormatError extends SessionError {
124
123
  }
125
124
 
126
125
  exports.AuthService = class AuthService {
127
- // private networkServices: HMNetworkServices;
128
- // private jwtManager: JwtManager
129
126
  constructor(config, storage, networkServices, jwtManager) {
130
127
  this.config = config;
131
128
  this.storage = storage;
132
129
  this.networkServices = networkServices;
133
130
  this.jwtManager = jwtManager;
134
- // this.networkServices = new HMNetworkServices(this.config.ssoBaseUrl);
135
- // this.jwtManager = new JwtManager();
136
131
  }
137
132
  /**
138
133
  * Genera los parámetros necesarios para iniciar el login SSO
@@ -320,7 +315,7 @@ exports.AuthService = __decorate([
320
315
  jwtManager.JwtManager])
321
316
  ], exports.AuthService);
322
317
 
323
- const AUTH_SERVICE_ID = 'AuthService';
318
+ const AUTH_SERVICE_ID = Symbol.for('HemiaAuthService');
324
319
 
325
320
  /**
326
321
  * Controller Abstracto Reutilizable
@@ -450,8 +445,6 @@ __decorate([
450
445
  ], exports.AbstractAuthController.prototype, "authService", void 0);
451
446
  __decorate([
452
447
  common.Get('/login'),
453
- __param(0, common.Req()),
454
- __param(1, common.Res()),
455
448
  __metadata("design:type", Function),
456
449
  __metadata("design:paramtypes", [Object, Object]),
457
450
  __metadata("design:returntype", Promise)
@@ -1 +1 @@
1
- export declare const AUTH_SERVICE_ID = "AuthService";
1
+ export declare const AUTH_SERVICE_ID: unique symbol;
@@ -1,4 +1,3 @@
1
- import "reflect-metadata";
2
1
  export * from "./controllers/abstract-auth.controller";
3
2
  export * from "./services";
4
3
  export * from "./types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemia/auth-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Hemia SDK for authentication",
5
5
  "main": "dist/hemia-auth-sdk.js",
6
6
  "module": "dist/hemia-auth-sdk.esm.js",
@@ -14,19 +14,19 @@
14
14
  "test:watch": "jest --watch"
15
15
  },
16
16
  "devDependencies": {
17
+ "@hemia/cache-manager": "^0.0.5",
18
+ "@hemia/common": "^0.0.2",
19
+ "@hemia/jwt-manager": "^0.0.4",
20
+ "@hemia/network-services": "^0.0.3",
17
21
  "@rollup/plugin-commonjs": "^26.0.1",
18
22
  "@rollup/plugin-json": "^6.1.0",
19
23
  "@rollup/plugin-node-resolve": "^15.2.3",
24
+ "@types/express": "^4.17.21",
20
25
  "@types/jest": "^29.5.14",
21
26
  "@types/node": "^22.3.0",
22
27
  "@typescript-eslint/eslint-plugin": "^8.5.0",
23
- "@hemia/network-services": "^0.0.3",
24
- "@hemia/common": "^0.0.2",
25
- "@hemia/cache-manager": "^0.0.5",
26
- "@hemia/jwt-manager": "^0.0.4",
27
- "@types/express": "^4.17.21",
28
- "express": "^5.2.1",
29
28
  "events": "^3.3.0",
29
+ "express": "^5.2.1",
30
30
  "inversify": "^7.11.0",
31
31
  "jest": "^29.7.0",
32
32
  "rimraf": "^6.0.1",
@@ -42,14 +42,11 @@
42
42
  "dist"
43
43
  ],
44
44
  "peerDependencies": {
45
- "reflect-metadata": "^0.2.2",
46
- "inversify": "^7.11.0",
45
+ "@hemia/cache-manager": "^0.0.5",
47
46
  "@hemia/common": "^0.0.2",
47
+ "@hemia/jwt-manager": "^0.0.4",
48
48
  "@hemia/network-services": "^0.0.3",
49
- "@hemia/cache-manager": "^0.0.5",
50
- "@hemia/jwt-manager": "^0.0.4"
51
- },
52
- "dependencies": {
53
-
49
+ "inversify": "^7.11.0",
50
+ "reflect-metadata": "^0.2.2"
54
51
  }
55
52
  }