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

@dt-esa/authorizer

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dt-esa/authorizer - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

12

dist/index.d.ts

@@ -1,2 +0,2 @@

export declare type AuthorizatonHandlerOptions = {
export declare type AuthenticationOptions = {
mode: 'azure' | 'saml' | 'client' | 'dynatrace';

@@ -34,10 +34,12 @@ authorizations?: Map<string, Array<string>>;

*
* @returns
*/
export declare const authorize: (options: AuthorizatonHandlerOptions) => any;
export declare const authentication: (options: AuthenticationOptions) => any;
/**
* Connect-style middleware that asserts all permissions are satisfied by the
* authenticated user. If a permission is missing, it will reject the transaction.
* @param permissions Permission ID strings.
* @param permissions A list of required Permissions or Scopes an authorized part must have.
*
* - Invoking this method with an empty array or no permissions specified will simply ensure
* that the user is authenticated.
*/
export declare const authentication: (permissions?: Array<string>) => (req: any, res: any, next: any) => any;
export declare const authorize: (permissions?: Array<string>) => (req: any, res: any, next: any) => any;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.authentication = exports.authorize = void 0;
exports.authorize = exports.authentication = void 0;
const express_1 = __importDefault(require("express"));

@@ -72,5 +72,4 @@ const axios_1 = __importDefault(require("axios"));

*
* @returns
*/
const authorize = (options) => {
const authentication = (options) => {
const { mode, clientConnectionPort } = options;

@@ -276,9 +275,12 @@ const router = express_1.default.Router();

};
exports.authorize = authorize;
exports.authentication = authentication;
/**
* Connect-style middleware that asserts all permissions are satisfied by the
* authenticated user. If a permission is missing, it will reject the transaction.
* @param permissions Permission ID strings.
* @param permissions A list of required Permissions or Scopes an authorized part must have.
*
* - Invoking this method with an empty array or no permissions specified will simply ensure
* that the user is authenticated.
*/
const authentication = (permissions = []) => {
const authorize = (permissions = []) => {
return (req, res, next) => {

@@ -306,2 +308,2 @@ if (!req._authorizedScopes) {

};
exports.authentication = authentication;
exports.authorize = authorize;
{
"name": "@dt-esa/authorizer",
"version": "1.3.0",
"version": "1.4.0",
"description": "",

@@ -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