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

@colearn/microservices-kit

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colearn/microservices-kit - npm Package Compare versions

Comparing version 0.0.38 to 0.0.39

3

lib/jwt.d.ts
/// <reference types="node" />
import type { NextFunction, Response, Request } from 'express';
import { Params } from 'express-jwt';
export declare function extractToken(req: Request): string | undefined;
export declare function extractBearerToken(req: Request): string | undefined;
export declare function extractTokenFromCookie(req: Request, cookieName?: string): string | undefined;
export declare function jwtMiddleware({ secret, algorithms, credentialsRequired, requestProperty, ...rest }: Params): (req: Request, res: Response, next: NextFunction) => Promise<void | NodeJS.Immediate>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.jwtMiddleware = exports.extractToken = void 0;
exports.jwtMiddleware = exports.extractTokenFromCookie = exports.extractBearerToken = void 0;
const express_jwt_1 = require("express-jwt");

@@ -19,2 +19,3 @@ const errors_1 = require("./errors");

}
exports.extractBearerToken = extractBearerToken;
function extractTokenFromCookie(req, cookieName) {

@@ -26,6 +27,3 @@ if (!cookieName) {

}
function extractToken(req) {
return extractBearerToken(req) || extractTokenFromCookie(req);
}
exports.extractToken = extractToken;
exports.extractTokenFromCookie = extractTokenFromCookie;
function jwtMiddleware({ secret, algorithms = ['HS256'], credentialsRequired = false, requestProperty = 'user', ...rest }) {

@@ -32,0 +30,0 @@ if (!secret) {

{
"name": "@colearn/microservices-kit",
"version": "0.0.38",
"version": "0.0.39",
"description": "colearn microservice kit",

@@ -5,0 +5,0 @@ "author": "Colearn",

Sorry, the diff of this file is not supported yet

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