New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@npmcorp/express-oauth-server

Package Overview
Dependencies
Maintainers
18
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcorp/express-oauth-server

OAuth provider for express

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
18
Created
Source

Express OAuth Server Build Status

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js.

This is the express wrapper for oauth2-server.

Installation

$ npm install express-oauth-server

Quick Start

The module provides two middlewares - one for granting tokens and another to authorise them. express-oauth-server and, consequently oauth2-server, expect the request body to be parsed already. The following example uses body-parser but you may opt for an alternative library.

var bodyparser = require('body-parser');
var express = require('express');
var OAuthServer = require('express-oauth-server');

var app = express();

app.oauth = new OAuthServer({
  model: {}, // See https://github.com/thomseddon/node-oauth2-server for specification
});

app.use(bodyParser.json());
app.use(bodyparser.urlencoded({ extended: false }))
app.use(app.oauth.authorise());

app.use(function(req, res) {
  res.send('Secret area');
});

app.listen(3000);

Keywords

FAQs

Package last updated on 29 Mar 2016

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