hapi-auth-couchdb
Lead Maintainer: Aco Mitevski
Supports Hapi 8.0
CouchDB authentication requires validating a AuthSession Cookie. The 'couchdb'
scheme takes the following options:
validateFunc
- (required) a user lookup and password validation function with the signaturefunction(username, password, callback)
where:AuthSession
- the AuthSession cookie received from the client.callback
- a callback function with the signaturefunction(err, isValid, credentials)
where:err
- an internal error.isValid
-true
if both the username was found and the password matched, otherwisefalse
.credentials
- a credentials object passed back to the application inrequest.auth.credentials
. Typically,credentials
are only included whenisValid
istrue
, but there are cases when the application needs to know who tried to authenticate even when it fails (e.g. with authentication mode'try'
).
var { var { helpersAPI ; };}; serverpack;