
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@webtask/bearer-auth-middleware
Advanced tools
Webtask middleware that implements generic bearer token authentication
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.
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.
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"}
Set the wt-compiler
metadata property on your webtask to @webtask/middleware-compiler
.
Set (or add to) the wt-middleware
metadata property of your webtask to contain a comma-separated list containing @webtask/bearer-auth-middleware
.
Set the wt-auth-secret
secret to a shared secret.
Issue requests to your webtask, making sure that you add an Authorization
header having the value: Bearer <SHARED_SECRET>
.
FAQs
Webtask middleware that implements generic bearer token authentication
We found that @webtask/bearer-auth-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.