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

@libj/http-meta

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libj/http-meta - npm Package Compare versions

Comparing version 0.0.21 to 0.1.0

6

dist/header/auth/httpBearerAuth.d.ts
export declare const makeHttpBearerAuth: (token: string) => string;
export declare const parseHttpBearerAuthToken: (auth: string) => string;
interface ParseOptions {
silent?: boolean;
}
export declare const parseHttpBearerAuthToken: (auth: string, options?: ParseOptions) => string | null;
export {};

13

dist/header/auth/httpBearerAuth.js

@@ -5,2 +5,3 @@ "use strict";

var HttpAuthScheme_1 = require("./HttpAuthScheme");
var error_1 = require("../../error");
exports.makeHttpBearerAuth = function (token) {

@@ -12,9 +13,13 @@ if (!token || !token.trim()) {

};
exports.parseHttpBearerAuthToken = function (auth) {
var parts = auth.split(HttpAuthScheme_1.HttpAuthScheme.BEARER);
if (parts.length === 2) {
exports.parseHttpBearerAuthToken = function (auth, options) {
if (options === void 0) { options = {}; }
var parts = auth && auth.split(HttpAuthScheme_1.HttpAuthScheme.BEARER);
if (parts && parts.length === 2 && parts[1].trim()) {
return parts[1].trim();
}
throw new Error("Unable to parse bearer token from auth: " + auth);
if (options.silent) {
return null;
}
throw new error_1.UnauthorizedHttpError();
};
//# sourceMappingURL=httpBearerAuth.js.map
{
"dependencies": {},
"name": "@libj/http-meta",
"version": "0.0.21",
"version": "0.1.0",
"description": "Http meta kit",

@@ -24,3 +24,3 @@ "author": "Sergey Poskachey <seregynp@gmail.com>",

],
"gitHead": "ca1018b4258d991964b8f2594dafda492454864f"
"gitHead": "569269235fb823d2d35933add6c86e1ee9eca888"
}

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