@borderless/parse-authorization
v1.0.0
Published
Parse the HTTP authorization header
Downloads
387
Maintainers
Readme
Parse Authorization
Parse the HTTP authorization header.
Installation
npm install @borderless/parse-authorization --save
Usage
import { basic, bearer } from "@borderless/parse-authorization";
expect(bearer("Bearer 123")).toEqual("123");
expect(basic("Basic dGVzdDoxMjPCow==")).toEqual(["test", "123£"]);
TypeScript
This project is written using TypeScript and publishes the definitions directly to NPM.
License
MIT