
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
oauth2-proxy-authentication
Advanced tools
NOTE: This npm will not work until after bitly/oauth2_proxy#147 is integrated.
Authenticates requests from bitly/oauth2_proxy based on a shared-secret HMAC signature of the request.
$ npm install oauth2-proxy-authentication --save
Assuming you're using Express, during
initialization of your application, where config.secretKey is the shared
secret between your application and the running instance of
bitly/oauth2_proxy:
var express = require('express');
var bodyParser = require('bodyParser');
var oauth2ProxyAuthentication = require('oauth2-proxy-authentication');
function doLaunch(config) {
var middlewareOptions = {
verify: oauth2ProxyAuthentication.middlewareValidator(config.secretKey)
};
var server = express();
server.use(bodyParser.raw(middlewareOptions));
// Continue server initialization...
}
If you're not using Express, you can use the function validateRequest(req, rawBody, secretKey) directly, where rawBody has already been converted to a
string.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
FAQs
Authenticates requests from bitly/oauth2_proxy
We found that oauth2-proxy-authentication demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.