@point3/logto-module 1.0.5 → 1.0.8

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 (40) hide show
  1. package/dist/client/__tests__/m2m-client.spec.js +14 -16
  2. package/dist/client/__tests__/m2m-client.spec.js.map +1 -1
  3. package/dist/client/__tests__/oauth-client.spec.js +15 -17
  4. package/dist/client/__tests__/oauth-client.spec.js.map +1 -1
  5. package/dist/client/config.js +4 -7
  6. package/dist/client/config.js.map +1 -1
  7. package/dist/client/index.js +5 -21
  8. package/dist/client/index.js.map +1 -1
  9. package/dist/client/logto-login-session.js +17 -23
  10. package/dist/client/logto-login-session.js.map +1 -1
  11. package/dist/client/m2m-client.js +29 -33
  12. package/dist/client/m2m-client.js.map +1 -1
  13. package/dist/client/oauth-client.js +26 -32
  14. package/dist/client/oauth-client.js.map +1 -1
  15. package/dist/client/types.js +10 -17
  16. package/dist/client/types.js.map +1 -1
  17. package/dist/errors.js +8 -19
  18. package/dist/errors.js.map +1 -1
  19. package/dist/index.js +4 -40
  20. package/dist/index.js.map +1 -1
  21. package/dist/module.js +19 -23
  22. package/dist/module.js.map +1 -1
  23. package/dist/stateless/decorator.js +4 -7
  24. package/dist/stateless/decorator.js.map +1 -1
  25. package/dist/stateless/guard.js +20 -56
  26. package/dist/stateless/guard.js.map +1 -1
  27. package/dist/stateless/guard.spec.js +22 -24
  28. package/dist/stateless/guard.spec.js.map +1 -1
  29. package/dist/stateless/index.js +2 -18
  30. package/dist/stateless/index.js.map +1 -1
  31. package/dist/token/access-token.js +1 -5
  32. package/dist/token/access-token.js.map +1 -1
  33. package/dist/token/index.js +2 -18
  34. package/dist/token/index.js.map +1 -1
  35. package/dist/token/verifier.js +15 -18
  36. package/dist/token/verifier.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/stateless/guard.ts +2 -2
  40. package/tsconfig.json +23 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@point3/logto-module",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "포인트3 내부 logto Authentication 모듈입니다",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@ import {
11
11
  import { Reflector } from '@nestjs/core';
12
12
  import { IncomingHttpHeaders } from 'http';
13
13
 
14
- import * as jose from 'jose';
14
+ import { errors } from 'jose';
15
15
 
16
16
  import { p3Values } from 'point3-common-tool';
17
17
  import * as token from '../token';
@@ -47,7 +47,7 @@ export class LogtoTokenGuard implements CanActivate {
47
47
  return true;
48
48
  } catch (error) {
49
49
  if (error instanceof UnauthorizedException) throw error;
50
- if (error instanceof jose.errors.JOSEError) throw new UnauthorizedException(error);
50
+ if (error instanceof errors.JOSEError) throw new UnauthorizedException(error);
51
51
  if (error instanceof Error) throw new InternalServerErrorException("요청을 처리하지 못하였습니다.", `${HttpStatus.INTERNAL_SERVER_ERROR}`);
52
52
 
53
53
  throw new UnauthorizedException("접근이 허용되지 않습니다.");
package/tsconfig.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "declaration": true,
5
- "removeComments": true,
6
- "emitDecoratorMetadata": true,
7
- "experimentalDecorators": true,
8
- "allowSyntheticDefaultImports": true,
9
- "target": "ES2021",
10
- "sourceMap": true,
11
- "outDir": "./dist",
12
- "baseUrl": "./",
13
- "incremental": true,
14
- "skipLibCheck": true,
15
- "strictNullChecks": false,
16
- "noImplicitAny": false,
17
- "strictBindCallApply": false,
18
- "forceConsistentCasingInFileNames": false,
19
- "noFallthroughCasesInSwitch": false,
20
- "moduleResolution": "node",
21
- "esModuleInterop": true,
22
- },
23
- }
2
+ "compilerOptions": {
3
+ "module": "ESNext",
4
+ "declaration": true,
5
+ "removeComments": true,
6
+ "emitDecoratorMetadata": true,
7
+ "experimentalDecorators": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "target": "ES2021",
10
+ "sourceMap": true,
11
+ "outDir": "./dist",
12
+ "baseUrl": "./",
13
+ "incremental": true,
14
+ "skipLibCheck": true,
15
+ "strictNullChecks": false,
16
+ "noImplicitAny": false,
17
+ "strictBindCallApply": false,
18
+ "forceConsistentCasingInFileNames": false,
19
+ "noFallthroughCasesInSwitch": false,
20
+ "moduleResolution": "node",
21
+ "esModuleInterop": true,
22
+ },
23
+ "type": "module"
24
+ }