petethepig/devtools-terminal — pull request #16 by skeggse (2013-12-12 18:42:34+00:00)
Title: Enable Custom Password Checking

Configuration can now specify a function to validate the password during authentication:

```js
var crypto = require('crypto');

// check the hash
function hash(raw, encoding){
return function(password){
var h = crypto.createHash('sha256');
h.update(password);
return h.digest(encoding || 'hex') === raw;
};
}

exports.config = {
users: {
admin: {
password: hash('9c0d9ae0fcf7572ca9a48eaa8b4d40730dc0f4e24ace3b38c35d34cb9fd1665e'),
cwd: '/',
}
},
port: 8080
};
```