You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2024. It is now read-only.
We are unable to use a custom security scheme based on the instructions listed at osprey's README.
We are using passport to setup the authentication middleware.
The issue/observed behavior is that the custom authentication function (passport.authenticate('my-apikey', { session: false })) specified as part of myCustomAuthScheme is not executed when handling a request.
All the code that is needed to test this is specified as the three blocks below. Save the three files with the names listed, then npm install && npm start to start up the app.
Individually app.use(...)ing the server, security, and error handlers appears to be the problem. If I compose them together, it appears to function as intended:
We are unable to use a custom security scheme based on the instructions listed at osprey's README.
We are using passport to setup the authentication middleware.
The issue/observed behavior is that the custom authentication function (
passport.authenticate('my-apikey', { session: false })
) specified as part ofmyCustomAuthScheme
is not executed when handling a request.All the code that is needed to test this is specified as the three blocks below. Save the three files with the names listed, then
npm install && npm start
to start up the app.api.raml
:app.js
:package.json
:Test Case:
Execute this curl request:
Expected behavior:
The app should return a 401 Unauthorized response
Actual behavior:
The
/users
resource is returned.The text was updated successfully, but these errors were encountered: