Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

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

Notifications You must be signed in to change notification settings

soundrop/koa-oauth-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 koa-oauth-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);

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%