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

@plumier/jwt

Package Overview
Dependencies
Maintainers
1
Versions
645
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plumier/jwt - npm Package Compare versions

Comparing version 1.0.0-canary.40 to 1.0.0-canary.41

3

lib/index.d.ts
import { AuthorizeStore, DefaultFacility, PlumierApplication, RouteInfo } from "@plumier/core";
import jwt from 'koa-jwt';
export declare type RoleField = string | ((value: any) => Promise<string[]>);

@@ -11,5 +12,5 @@ export interface JwtAuthFacilityOption {

private option;
constructor(option: JwtAuthFacilityOption);
constructor(option: JwtAuthFacilityOption & jwt.Options);
setup(app: Readonly<PlumierApplication>): void;
initialize(app: Readonly<PlumierApplication>, routes: RouteInfo[]): Promise<void>;
}

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

app.set({ authorizer: this.option.authorizer });
app.koa.use(koa_jwt_1.default({ secret: this.option.secret, passthrough: true }));
app.koa.use(koa_jwt_1.default(Object.assign(Object.assign({ cookie: "Authorization" }, this.option), { secret: this.option.secret, passthrough: true })));
app.use(new core_1.AuthorizeMiddleware(this.option.roleField || "role", this.option.global));

@@ -19,0 +19,0 @@ }

{
"name": "@plumier/jwt",
"version": "1.0.0-canary.40+0344edd",
"version": "1.0.0-canary.41+fac0173",
"description": "Plumier authorization module using JWT",

@@ -13,3 +13,3 @@ "main": "lib/index.js",

"dependencies": {
"@plumier/core": "1.0.0-canary.40+0344edd",
"@plumier/core": "1.0.0-canary.41+fac0173",
"koa-jwt": "^3.6.0"

@@ -27,3 +27,3 @@ },

},
"gitHead": "0344edd674043421527e30d18509bb31fa8911c8"
"gitHead": "fac0173804a41548a42032d50104cd5e764e6384"
}
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