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

@webtask/bearer-auth-middleware

Package Overview
Dependencies
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webtask/bearer-auth-middleware

Webtask middleware that implements generic bearer token authentication

  • 1.5.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
8
Weekly downloads
 
Created
Source

Bearer auth middleware

The bearer auth middleware is a generic bearer token authentication solution for webtasks. A request to a webtask configured with this middleware will be rejected with a 401 response if it lacks the correct bearer token.

Usage

To use the bearer auth middleware requires encoding a shared secret in the wt-auth-secret secret that must be specified in Authentication: Bearer <SHARED_SECRET> headers.

  1. Set the wt-node-dependencies metadata property to the stringified JSON of an object having @webtask/middleware-compiler and @webtask/bearer-auth-middleware properties whose values are the latest version of the @webtask/middleware-compiler module and this module, respectively.

    {"@webtask/middleware-compiler":"1.1.0","@webtask/bearer-auth-middleware":"1.1.0"}
    
  2. Set the wt-compiler metadata property on your webtask to @webtask/middleware-compiler.

  3. Set (or add to) the wt-middleware metadata property of your webtask to contain a comma-separated list containing @webtask/bearer-auth-middleware.

  4. Set the wt-auth-secret secret to a shared secret.

  5. Issue requests to your webtask, making sure that you add an Authorization header having the value: Bearer <SHARED_SECRET>.

FAQs

Package last updated on 02 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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