GithubHelp home page GithubHelp logo

hadimazalan / loopback-component-oauth2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from strongloop/loopback-component-oauth2

0.0 3.0 0.0 1.1 MB

oAuth 2.0 server for LoopBack

Home Page: http://www.strongloop.com

License: Other

Makefile 0.64% JavaScript 99.36%

loopback-component-oauth2's Introduction

loopback-component-oauth2

The LoopBack oAuth 2.0 component provides full integration between OAuth 2.0 and LoopBack. It enables LoopBack applications to function as an oAuth 2.0 provider to authenticate and authorize client applications and/or resource owners (i.e. users) to access protected API endpoints.

The oAuth 2.0 protocol implementation is based on oauth2orize and passport.

See LoopBack Documentation - OAuth 2.0 Component for more information.

Install

Install the component as usual:

$ npm install loopback-component-oauth2

Use

Use in an application as follows:

var oauth2 = require('loopback-component-oauth2');

var options = { 
  dataSource: app.dataSources.db, // Data source for oAuth2 metadata persistence
  loginPage: '/login', // The login page url
  loginPath: '/login' // The login form processing url
};

oauth2.oAuth2Provider(
  app, // The app instance
  options // The options
);

The app instance will be used to set up middleware and routes. The data source provides persistence for the oAuth 2.0 metadata models.

For more information, see OAuth 2.0 LoopBack component official documentation.

Example

This example demonstrates how to implement an OAuth service provider, complete with protected API access.

loopback-component-oauth2's People

Contributors

jaredhanson avatar raymondfeng avatar dhmlau avatar bajtos avatar frankhassanabad avatar loay avatar rmg avatar 0candy avatar siddhipai avatar candytangnb avatar noamcb avatar sam-github avatar tellnes avatar clarkbw avatar eatskolnikov avatar woodedlawn avatar crandmck avatar royklopper avatar scttnlsn avatar superkhau avatar cmccall avatar gunjpan avatar

Watchers

James Cloos avatar Hadi Mazalan avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.