阅读背景:

使用要求。将params作为护照的输入。js(使用Express 4.0)

来源:互联网 

We are building an API that consumes multiple API's (to make it easier for students and fellow researcher to download data) and as things are progressing the amount of Routers and Strategies are building up. To avoid reusing the same code and changing one name in the link we thought to use the req.params to make a universal authenticationRouter to handle the general authentication through Oauth2 of users granting us access to their information. The issue we are running into is how to parse the req.params into the passport.authenticate function to use the specific strategy. Ideally we would like the strategy to be universal as well by loading the API-specific settings into the Strategy. We are building an API that consumes multiple A




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: