This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

yion-oauth

0.2.1 • Public • Published

YION OAUTH PLUGIN

A OAuth plugin for framework Yion

You need a OAuth authorize token server

Install

$ npm install --save yion-oauth

Usage

const { createServer, createApp } = require('yion');
const security = require('yion-oauth')(urlToValidateToken, methodOfUrl);

const app = createApp();
const server = createServer(app, [security]);

app.get('/', (req, res) => {
    req.isAuthenticated().then().catch(); 
});

API reference

Response render method :

  • isAuthenticated(token=null): call OAuth authorize server to validate token (from headers['Authorization'] or from token parameter)

Readme

Keywords

none

Package Sidebar

Install

npm i yion-oauth

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • kevinbalicot