New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

keycloak-mock

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keycloak-mock - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

13

dist/views/createToken.js

@@ -6,3 +6,3 @@ "use strict";

const { grant_type: grantType, client_id: clientID, scope } = body;
if (instance.params.clientID !== clientID) {
if (clientID && instance.params.clientID !== clientID) {
return [400, "Bad request"];

@@ -19,7 +19,12 @@ }

else if (grantType === "client_credentials") {
const { client_secret: clientSecret } = body;
if (!clientSecret) {
const { username, password, client_secret: clientSecret } = body;
if (!clientID && !username) {
return [400, "Bad request"];
}
user = instance.database.matchForClientGrant(clientID, clientSecret);
if (!clientSecret && !password) {
return [400, "Bad request"];
}
// some clients specify the client ID and client secret as
// username and password, hence the fallback
user = instance.database.matchForClientGrant(clientID || username, clientSecret || password);
}

@@ -26,0 +31,0 @@ else {

@@ -10,3 +10,3 @@ import { v4 as uuidv4 } from "uuid";

if (instance.params.clientID !== clientID) {
if (clientID && instance.params.clientID !== clientID) {
return [400, "Bad request"];

@@ -25,8 +25,18 @@ }

} else if (grantType === "client_credentials") {
const { client_secret: clientSecret } = body;
if (!clientSecret) {
const { username, password, client_secret: clientSecret } = body;
if (!clientID && !username) {
return [400, "Bad request"];
}
user = instance.database.matchForClientGrant(clientID, clientSecret);
if (!clientSecret && !password) {
return [400, "Bad request"];
}
// some clients specify the client ID and client secret as
// username and password, hence the fallback
user = instance.database.matchForClientGrant(
clientID || username,
clientSecret || password
);
} else {

@@ -33,0 +43,0 @@ return [400, "Bad request"];

{
"name": "keycloak-mock",
"version": "1.0.2",
"version": "1.0.3",
"description": "Keycloak server mock for Node.js",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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