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

@webtask/cron-auth-middleware

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webtask/cron-auth-middleware

Webtask middleware that implements cron authentication

  • 1.2.2
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
8
Weekly downloads
 
Created
Source

Cron auth middleware

The cron auth middleware provides a simple cron authentication mechanism so that the Webtask cron daemon is able to make authenticated requests but third parties cannot.

Usage

To use the cron auth middleware leverages the fact that the Webtask cron daemon will invoke cron webtasks with an Authentication header having a bearer token corresponding to the underlying webtask token of that cron job.

  1. Set the wt-node-dependencies metadata property to the stringified JSON of an object having @webtask/middleware-compiler and @webtask/cron-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/cron-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/cron-auth-middleware.

  4. Schedule the webtask to run periodically and note that requests lacking an appropriate Authorization header will fail with a 401 response.

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