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

backtrace-service

Package Overview
Dependencies
Maintainers
7
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backtrace-service - npm Package Compare versions

Comparing version 3.4.0-alpha.0 to 3.4.0-alpha.1

5

lib/identity/identity.d.ts
import { NextFunction, Request, Response } from 'express';
import { Logger } from '../log/logger';
import { ApiError } from '../model/apiError';
import { IServiceDescriptor } from '../model/serviceDescriptor';

@@ -65,3 +64,3 @@ import { IAuthRequest } from './model/authRequest';

roles?: BacktraceRole | BacktraceRole[];
}): (request: Request, _: Response, next: NextFunction) => Promise<void | ApiError>;
}): (request: Request, response: Response, next: NextFunction) => Promise<void>;
isAuthenticatedRequest(request: Request): request is IAuthRequest;

@@ -74,3 +73,3 @@ /**

*/
authenticateRequest(): (request: Request, response: Response, next: NextFunction) => Promise<void | ApiError>;
authenticateRequest(): (request: Request, response: Response, next: NextFunction) => Promise<void>;
private verifyProjectAccess;

@@ -77,0 +76,0 @@ /**

6

lib/identity/identity.js

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

var manager = this;
function authorizeBacktraceUser(request, _, next) {
function authorizeBacktraceUser(request, response, next) {
var _a, _b, _c;

@@ -286,5 +286,7 @@ return __awaiter(this, void 0, void 0, function () {

case 0:
// This function checks project access, so we can bypass the project check
manager.bypassProjectAccessCheck(response);
if (!manager.isAuthenticatedRequest(request)) {
(_a = manager._logger) === null || _a === void 0 ? void 0 : _a.warn("Request not authenticated!");
return [2 /*return*/, new apiError_1.ApiError("Access denied", 403)];
return [2 /*return*/, next(new apiError_1.ApiError("Access denied", 403))];
}

@@ -291,0 +293,0 @@ configuration = request.coronerAuth.cfg;

{
"name": "backtrace-service",
"version": "3.4.0-alpha.0",
"version": "3.4.0-alpha.1",
"description": "Common tools for Backtrace Node services",

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

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