nestjs-keycloak-auth 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -234,7 +234,7 @@ Here are the decorators you can use in your controllers.
234
234
 
235
235
  | Decorator | Description |
236
236
  | ------------------ | --------------------------------------------------------------------------------------------------------- |
237
- | @KeycloakUser | Retrieves the current Keycloak logged-in user. (must be per method, unless controller is request scoped.) |
237
+ | @AuthenticatedUser | Retrieves the current Keycloak logged-in user. (must be per method, unless controller is request scoped.) |
238
238
  | @AccessToken | Retrieves the access token used in the request |
239
239
  | @ResolvedScopes | Retrieves the resolved scopes (used in @ConditionalScopes) |
240
240
  | @EnforcerOptions | Keycloak enforcer options. |
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Retrieves the current Keycloak logged-in user.
2
+ * Retrieves the current authenticated user from the request.
3
3
  * @since 1.5.0
4
4
  */
5
+ export declare const AuthenticatedUser: (...dataOrPipes: unknown[]) => ParameterDecorator;
6
+ /**
7
+ * @deprecated Use `AuthenticatedUser` instead.
8
+ */
5
9
  export declare const KeycloakUser: (...dataOrPipes: unknown[]) => ParameterDecorator;
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KeycloakUser = void 0;
3
+ exports.KeycloakUser = exports.AuthenticatedUser = void 0;
4
4
  const internal_util_1 = require("../internal.util");
5
5
  const common_1 = require("@nestjs/common");
6
6
  /**
7
- * Retrieves the current Keycloak logged-in user.
7
+ * Retrieves the current authenticated user from the request.
8
8
  * @since 1.5.0
9
9
  */
10
- exports.KeycloakUser = (0, common_1.createParamDecorator)((data, ctx) => {
10
+ exports.AuthenticatedUser = (0, common_1.createParamDecorator)((data, ctx) => {
11
11
  const [req] = (0, internal_util_1.extractRequest)(ctx);
12
12
  return req.user;
13
13
  });
14
+ /**
15
+ * @deprecated Use `AuthenticatedUser` instead.
16
+ */
17
+ exports.KeycloakUser = exports.AuthenticatedUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-keycloak-auth",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Keycloak authentication and authorization module for NestJS",
5
5
  "author": "B. Joshua Adedigba",
6
6
  "contributors": [
@@ -73,7 +73,7 @@
73
73
  "@nestjs/axios": ">=3.0.0",
74
74
  "@nestjs/common": ">=10.0.0 <12.0.0",
75
75
  "@nestjs/core": ">=10.0.0 <12.0.0",
76
- "axios": ">=1.0.0"
76
+ "axios": ">=1.0.0 <1.14.0"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@nestjs/axios": "^4.0.0",
@@ -84,7 +84,7 @@
84
84
  "@types/express": "^5.0.6",
85
85
  "@types/jest": "^30.0.0",
86
86
  "@types/node": "^18.19.23",
87
- "axios": "^1.7.0",
87
+ "axios": ">=1.7.0 <1.14.0",
88
88
  "class-transformer": "0.5.1",
89
89
  "class-validator": "0.14.1",
90
90
  "cpr": "3.0.1",