Open paul42 opened 9 years ago
If you handler invokes next()
then it passes, if it is next(error)
then it does not.
An example of this can be seen in the test fixture: https://github.com/krakenjs/swaggerize-express/blob/master/test/fixtures/security/auth_default.js
I will take a note to provide better docs here.
I apologize, but I'm having a hard time finding out how to properly build a basic auth handler - I have a file pointed at with x-authorize, and it loads that file, but I don't quite understand the underlying mechanic that I should build - I have the x-ssl-client-common-name in the header, and I'm trying to validate against that.
and that works when the headers are set correctly, but I don't know how to build this handler to behave when it should return a 401 instead - do I have it return an error on next? should I just have it return without calling next? I'm not certain the desired path - most examples just show oauth2 examples or are empty so I'm not fully understanding.
Thanks in advance, -Paul