Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nest-keycloak-connect

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nest-keycloak-connect - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

20

guards/auth.guard.js

@@ -44,8 +44,13 @@ "use strict";

const jwt = (_a = this.extractJwtFromCookie(request.cookies)) !== null && _a !== void 0 ? _a : this.extractJwt(request.headers);
const result = yield this.keycloak.grantManager.validateAccessToken(jwt);
if (typeof result === 'string') {
request.user = yield this.keycloak.grantManager.userInfo(jwt);
request.accessTokenJWT = jwt;
return true;
try {
const result = yield this.keycloak.grantManager.validateAccessToken(jwt);
if (typeof result === 'string') {
request.user = yield this.keycloak.grantManager.userInfo(jwt);
request.accessTokenJWT = jwt;
return true;
}
}
catch (ex) {
console.error(`validateAccessToken Error: `, ex);
}
throw new common_1.UnauthorizedException();

@@ -65,6 +70,3 @@ });

extractJwtFromCookie(cookies) {
if (cookies) {
return cookies[this.keycloakOpts.cookieKey] || cookies.KEYCLOAK_JWT;
}
return null;
return cookies && cookies[this.keycloakOpts.cookieKey] || cookies && cookies.KEYCLOAK_JWT;
}

@@ -71,0 +73,0 @@ };

{
"name": "nest-keycloak-connect",
"version": "1.1.1",
"version": "1.1.2",
"description": "keycloak-nodejs-connect module for Nest",

@@ -8,3 +8,4 @@ "author": "John Joshua Ferrer <johnjoshuaferrer@disroot.org>",

"IERomanov <i.e.romanov1997@gmail.com>",
"Jeff Tian <jeff.tian@outlook.com>"
"Jeff Tian <jeff.tian@outlook.com>",
"EFritzsche90"
],

@@ -11,0 +12,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc