Implement a new middleware factory
loopback-component-oauth2#authenticate that can be configured
in server/middleware.json and which invokes the authentication
middleware created by loopback-component-oauth2(app).
Modify the main exported function to store the list of OAuth2
handlers/endpoints on the app object, so that the new middleware can
retrieve it from there.
/to @raymondfeng please review
This is the Gateway configuration that works for me (I'll send a pull request shortly):
Implement a new middleware factory
loopback-component-oauth2#authenticate
that can be configured inserver/middleware.json
and which invokes the authentication middleware created byloopback-component-oauth2(app)
.Modify the main exported function to store the list of OAuth2 handlers/endpoints on the app object, so that the new middleware can retrieve it from there.
/to @raymondfeng please review
This is the Gateway configuration that works for me (I'll send a pull request shortly):
server/component-config.json
server/middleware.json (snippet)