Socket
Socket
Sign inDemoInstall

koa-oauth-server

Package Overview
Dependencies
7
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    koa-oauth-server

OAuth provider for koa


Version published
Weekly downloads
49
decreased by-31.94%
Maintainers
1
Install size
204 kB
Created
Weekly downloads
 

Readme

Source

Koa OAuth Server

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

This is the koa wrap for: https://github.com/thomseddon/node-oauth2-server

Installation

$ npm install node-oauth2-server

Quick Start

The module provides a single middleware:

var koa = require('koa');
var oauthserver = require('koa-oauth-server');

var app = koa();

app.oauth = oauthserver({
  model: {}, // See https://github.com/thomseddon/node-oauth2-server for specification
  grants: ['password'],
  debug: true
});

app.use(app.oauth.authorise());

app.use(function *(next) {
  this.body = 'Secret area';
  yield next;
});

app.listen(3000);

Keywords

FAQs

Last updated on 17 Jan 2014

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc