@nestjs-kitchen/authz 3.0.0 → 3.0.1
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/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/jwt/jwt-authz.guard.d.ts +1 -1
- package/dist/jwt/jwt-authz.interface.js +1 -1
- package/dist/jwt/jwt-authz.module.d.ts +1 -1
- package/dist/jwt/jwt-authz.module.js +1 -1
- package/dist/jwt/jwt-authz.service.d.ts +1 -1
- package/dist/session/session-authz.guard.d.ts +1 -1
- package/dist/session/session-authz.module.d.ts +1 -1
- package/dist/session/session-authz.module.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AuthzProviderClass } from './authz.provider';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { ExtractJwt, type JwtFromRequestFunction, createJwtAuthzModule } from './jwt';
|
|
2
|
+
export { AuthzAnonymousError, AuthzError, AuthzVerificationError } from './errors';
|
|
3
|
+
export { createJwtAuthzModule, ExtractJwt, type JwtFromRequestFunction } from './jwt';
|
|
5
4
|
export { cereateSessionAuthzModule } from './session';
|
|
5
|
+
export { User } from './user.decorator';
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.User = exports.cereateSessionAuthzModule = exports.ExtractJwt = exports.createJwtAuthzModule = exports.AuthzVerificationError = exports.AuthzError = exports.AuthzAnonymousError = exports.AuthzProviderClass = void 0;
|
|
4
4
|
var authz_provider_1 = require("./authz.provider");
|
|
5
5
|
Object.defineProperty(exports, "AuthzProviderClass", { enumerable: true, get: function () { return authz_provider_1.AuthzProviderClass; } });
|
|
6
|
-
var user_decorator_1 = require("./user.decorator");
|
|
7
|
-
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_decorator_1.User; } });
|
|
8
6
|
var errors_1 = require("./errors");
|
|
7
|
+
Object.defineProperty(exports, "AuthzAnonymousError", { enumerable: true, get: function () { return errors_1.AuthzAnonymousError; } });
|
|
9
8
|
Object.defineProperty(exports, "AuthzError", { enumerable: true, get: function () { return errors_1.AuthzError; } });
|
|
10
9
|
Object.defineProperty(exports, "AuthzVerificationError", { enumerable: true, get: function () { return errors_1.AuthzVerificationError; } });
|
|
11
|
-
Object.defineProperty(exports, "AuthzAnonymousError", { enumerable: true, get: function () { return errors_1.AuthzAnonymousError; } });
|
|
12
10
|
var jwt_1 = require("./jwt");
|
|
13
|
-
Object.defineProperty(exports, "ExtractJwt", { enumerable: true, get: function () { return jwt_1.ExtractJwt; } });
|
|
14
11
|
Object.defineProperty(exports, "createJwtAuthzModule", { enumerable: true, get: function () { return jwt_1.createJwtAuthzModule; } });
|
|
12
|
+
Object.defineProperty(exports, "ExtractJwt", { enumerable: true, get: function () { return jwt_1.ExtractJwt; } });
|
|
15
13
|
var session_1 = require("./session");
|
|
16
14
|
Object.defineProperty(exports, "cereateSessionAuthzModule", { enumerable: true, get: function () { return session_1.cereateSessionAuthzModule; } });
|
|
15
|
+
var user_decorator_1 = require("./user.decorator");
|
|
16
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_decorator_1.User; } });
|
|
@@ -4,8 +4,8 @@ import { Reflector } from '@nestjs/core';
|
|
|
4
4
|
import type { Observable } from 'rxjs';
|
|
5
5
|
import { AuthzProviderClass } from '../authz.provider';
|
|
6
6
|
import { type AuthzError } from '../errors';
|
|
7
|
-
import type { JwtAlsType } from './jwt-authz-als.middleware';
|
|
8
7
|
import type { JwtAuthzOptions } from './jwt-authz.interface';
|
|
8
|
+
import type { JwtAlsType } from './jwt-authz-als.middleware';
|
|
9
9
|
export declare const createJwtAuthzGuard: ([JWT_STRATEGY, AUTHZ_PROVIDER, JWT_AUTHZ_OPTIONS, ALS_PROVIDER, JWT_META_KEY, JWT_REFRESH_META_KEY]: [string, any, any, any, any, any]) => Type<Omit<{
|
|
10
10
|
readonly reflector: Reflector;
|
|
11
11
|
readonly authzProvider: AuthzProviderClass<unknown, unknown>;
|
|
@@ -4,8 +4,8 @@ import type { Reflector } from '@nestjs/core';
|
|
|
4
4
|
import { AuthzProviderClass } from '../authz.provider';
|
|
5
5
|
import { AuthzError } from '../errors';
|
|
6
6
|
import { type AbstractConstructor, type ApplyDecorators, type AuthzDecoParams, type AuthzModuleBaseOptions, type AuthzModuleRoutesOptions, type CookieOptionsWithSecret, type DeepReadonly, type MethodParameters, type RoutesOptions } from '../utils';
|
|
7
|
-
import { type JwtAlsType } from './jwt-authz-als.middleware';
|
|
8
7
|
import { type JwtAuthzModuleOptions, type JwtAuthzOptions, type JwtOptions } from './jwt-authz.interface';
|
|
8
|
+
import { type JwtAlsType } from './jwt-authz-als.middleware';
|
|
9
9
|
declare const ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions<JwtAuthzModuleOptions, "createJwtAuthzModuleOptions"> & Partial<{
|
|
10
10
|
authzProvider?: Type<AuthzProviderClass<unknown, unknown>>;
|
|
11
11
|
} & AuthzModuleRoutesOptions>, OPTIONS_TYPE: Partial<AuthzModuleBaseOptions> & {
|
|
@@ -19,11 +19,11 @@ const uid_1 = require("uid");
|
|
|
19
19
|
const constants_1 = require("../constants");
|
|
20
20
|
const errors_1 = require("../errors");
|
|
21
21
|
const utils_1 = require("../utils");
|
|
22
|
-
const jwt_authz_als_middleware_1 = require("./jwt-authz-als.middleware");
|
|
23
22
|
const jwt_authz_guard_1 = require("./jwt-authz.guard");
|
|
24
23
|
const jwt_authz_interface_1 = require("./jwt-authz.interface");
|
|
25
24
|
const jwt_authz_service_1 = require("./jwt-authz.service");
|
|
26
25
|
const jwt_authz_strategy_1 = require("./jwt-authz.strategy");
|
|
26
|
+
const jwt_authz_als_middleware_1 = require("./jwt-authz-als.middleware");
|
|
27
27
|
const store = {
|
|
28
28
|
globalInited: 0
|
|
29
29
|
};
|
|
@@ -2,8 +2,8 @@ import { AsyncLocalStorage } from 'node:async_hooks';
|
|
|
2
2
|
import { type Type } from '@nestjs/common';
|
|
3
3
|
import { AuthzProviderClass } from '../authz.provider';
|
|
4
4
|
import { type CookieOptionsWithSecret, type DeepReadonly } from '../utils';
|
|
5
|
-
import type { JwtAlsType } from './jwt-authz-als.middleware';
|
|
6
5
|
import type { JwtAuthzOptions } from './jwt-authz.interface';
|
|
6
|
+
import type { JwtAlsType } from './jwt-authz-als.middleware';
|
|
7
7
|
export declare const createJwtAuthzService: <P = unknown, U = unknown>([AUTHZ_PROVIDER, JWT_AUTHZ_OPTIONS, ALS_PROVIDER]: [any, any, any]) => Type<Omit<{
|
|
8
8
|
readonly authzProvider: AuthzProviderClass<P, U>;
|
|
9
9
|
readonly jwtAuthzOptions: JwtAuthzOptions;
|
|
@@ -3,8 +3,8 @@ import { Reflector } from '@nestjs/core';
|
|
|
3
3
|
import type { AsyncLocalStorage } from 'async_hooks';
|
|
4
4
|
import { AuthzProviderClass } from '../authz.provider';
|
|
5
5
|
import { type AuthzError } from '../errors';
|
|
6
|
-
import type { SessionAlsType } from './session-authz-als.middleware';
|
|
7
6
|
import type { SessionAuthzOptions } from './session-authz.interface';
|
|
7
|
+
import type { SessionAlsType } from './session-authz-als.middleware';
|
|
8
8
|
export declare const createSessionAuthzGuard: ([SESSION_STRATEGY, AUTHZ_PROVIDER, SESSION_AUTHZ_OPTIONS, ALS_PROVIDER, SESSION_META_KEY]: [string, any, any, any, any]) => Type<Omit<{
|
|
9
9
|
readonly reflector: Reflector;
|
|
10
10
|
readonly authzProvider: AuthzProviderClass<unknown, unknown>;
|
|
@@ -4,8 +4,8 @@ import type { Reflector } from '@nestjs/core';
|
|
|
4
4
|
import { AuthzProviderClass } from '../authz.provider';
|
|
5
5
|
import { AuthzError } from '../errors';
|
|
6
6
|
import { type AbstractConstructor, type ApplyDecorators, type AuthzDecoParams, type AuthzModuleBaseOptions, type AuthzModuleRoutesOptions, type CookieOptionsWithSecret, type DeepReadonly, type MethodParameters, type RoutesOptions } from '../utils';
|
|
7
|
-
import { type SessionAlsType } from './session-authz-als.middleware';
|
|
8
7
|
import { type SessionAuthzModuleOptions, type SessionAuthzOptions } from './session-authz.interface';
|
|
8
|
+
import { type SessionAlsType } from './session-authz-als.middleware';
|
|
9
9
|
declare const ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions<SessionAuthzModuleOptions, "createSessionAuthzModuleOptions"> & Partial<{
|
|
10
10
|
authzProvider?: Type<AuthzProviderClass<unknown, unknown>>;
|
|
11
11
|
} & AuthzModuleRoutesOptions>, OPTIONS_TYPE: Partial<AuthzModuleBaseOptions> & {
|
|
@@ -19,11 +19,11 @@ const uid_1 = require("uid");
|
|
|
19
19
|
const constants_1 = require("../constants");
|
|
20
20
|
const errors_1 = require("../errors");
|
|
21
21
|
const utils_1 = require("../utils");
|
|
22
|
-
const session_authz_als_middleware_1 = require("./session-authz-als.middleware");
|
|
23
22
|
const session_authz_guard_1 = require("./session-authz.guard");
|
|
24
23
|
const session_authz_interface_1 = require("./session-authz.interface");
|
|
25
24
|
const session_authz_service_1 = require("./session-authz.service");
|
|
26
25
|
const session_authz_strategy_1 = require("./session-authz.strategy");
|
|
26
|
+
const session_authz_als_middleware_1 = require("./session-authz-als.middleware");
|
|
27
27
|
const store = {
|
|
28
28
|
globalInited: 0
|
|
29
29
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@nestjs-kitchen/authz",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "Simplest authentication & authorization module in NextJS",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.1",
|
|
6
6
|
"homepage": "https://github.com/yikenman/nestjs-kitchen",
|
|
7
7
|
"repository": "https://github.com/yikenman/nestjs-kitchen",
|
|
8
8
|
"author": "yikenman",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@types/cookie-parser": "^1.4.8",
|
|
31
31
|
"@types/express": "^5.0.1",
|
|
32
32
|
"@types/express-session": "^1.18.1",
|
|
33
|
-
"@types/jest": "^
|
|
33
|
+
"@types/jest": "^30.0.0",
|
|
34
34
|
"@types/jsonwebtoken": "^9.0.9",
|
|
35
35
|
"@types/node": "^22.13.9",
|
|
36
36
|
"@types/passport": "^1.0.17",
|
|
37
37
|
"@types/supertest": "^6.0.2",
|
|
38
38
|
"express-session": "^1.18.1",
|
|
39
|
-
"jest": "^
|
|
39
|
+
"jest": "^30.0.5",
|
|
40
40
|
"rimraf": "^6.0.1",
|
|
41
41
|
"supertest": "^7.1.0",
|
|
42
42
|
"ts-jest": "^29.3.0",
|