gevorg/http-auth — Issue #5: Can't get digest to work
Author: alfrednerstu
Created: 2011-12-09 22:21:09+00:00
State: open

*Basic* authentication works fine but I don't get *digest* to work. My code looks like this (i'm calling both digest for convenience):

auth = require 'http-auth'

# basic
digest = auth(
authRealm: 'admin'
authType: 'basic'
authList: ['alfred:{SHA}x511ncXd+4fOnYAotcGPFD0peYo=']
)

# digest

digest = auth(
authRealm: 'admin'
authType: 'digest'
authList: ['alfred:admin:{SHA}x511ncXd+4fOnYAotcGPFD0peYo=']
)

# routes

app.get "/admin", digest.apply, admin.index