How to setup OAuth 2.0 server using loopback

北慕城南 提交于 2019-12-21 07:14:32

问题


I want to setup an OAuth 2.0 Server using Loopback using a package called loopback-component-oauth2

The documentation is here : https://docs.strongloop.com/display/public/LB/OAuth+2.0#OAuth2.0-UsingtheOAuth2component

But it is very unclear, what models should i create and what rest endpoint should be defined?

Please help!


回答1:


First of all, it's important to note that the documentation might be outdated:

After IBM’s acquisition of StrongLoop, we have integrated strong-gateway with the latest product offering from IBM called API Connect.

In any case, if you need some directions on how the server is set to provide OAUTH 2 authentications you should look at the following git project and pay a close attention to the following:

  • strong-gateway/server/server.js - gives you an idea of which modules and methods to create inside your server script.
  • strong-gateway/test/ * - has a bunch of scripts that shows how it is used in an authorization context.

Git project using OAuth2.0 with the StrongLoop API Gateway: https://github.com/strongloop-archive/strong-gateway



来源:https://stackoverflow.com/questions/39874085/how-to-setup-oauth-2-0-server-using-loopback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!