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.9 to 1.0.10

1

dist/createBearerToken.d.ts

@@ -10,4 +10,5 @@ import { JWK } from "node-jose";

authServerURL: string;
audience?: string | string[];
}
declare const createBearerToken: (options: CreateTokenOptions) => string;
export default createBearerToken;

7

dist/createBearerToken.js

@@ -20,10 +20,7 @@ "use strict";

session_state: uuid_1.v4(),
}, options.key.toPEM(true), {
algorithm: "RS256",
header: {
}, options.key.toPEM(true), Object.assign({ algorithm: "RS256", header: {
typ: "JWT",
kid: options.key.kid,
},
});
} }, (options.audience && { audience: options.audience })));
};
exports.default = createBearerToken;

@@ -20,2 +20,5 @@ import { JWK } from "node-jose";

}
export interface BearerTokenOptions {
audience?: string | string[];
}
declare class MockInstance {

@@ -28,5 +31,5 @@ store: JWK.KeyStore;

createURL(path: string): string;
createBearerToken(sub: string, expiresIn?: number): string;
createBearerToken(sub: string, expiresIn?: number, options?: BearerTokenOptions): string;
}
declare const createMockInstance: (options: CreateMockInstanceOptions) => Promise<MockInstance>;
export { MockInstance, createMockInstance };

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

}
createBearerToken(sub, expiresIn = 3600) {
createBearerToken(sub, expiresIn = 3600, options = {}) {
const user = this.database.findUserByID(sub);

@@ -32,2 +32,3 @@ if (!user) {

authServerURL: this.params.authServerURL,
audience: options.audience,
});

@@ -34,0 +35,0 @@ }

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

authServerURL: string;
audience?: string | string[];
}

@@ -40,2 +41,3 @@

},
...(options.audience && { audience: options.audience }),
}

@@ -42,0 +44,0 @@ );

@@ -26,2 +26,6 @@ import { JWK } from "node-jose";

export interface BearerTokenOptions {
audience?: string | string[];
}
class MockInstance {

@@ -49,3 +53,7 @@ store: JWK.KeyStore;

createBearerToken(sub: string, expiresIn: number = 3600): string {
createBearerToken(
sub: string,
expiresIn: number = 3600,
options: BearerTokenOptions = {}
): string {
const user = this.database.findUserByID(sub);

@@ -63,2 +71,3 @@ if (!user) {

authServerURL: this.params.authServerURL,
audience: options.audience,
});

@@ -65,0 +74,0 @@ }

{
"name": "keycloak-mock",
"version": "1.0.9",
"version": "1.0.10",
"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