Prompt login if auth enabled

This commit is contained in:
Nick O'Leary
2014-11-11 10:15:02 +00:00
parent 2128b57ab2
commit 28823802ea
13 changed files with 249 additions and 136 deletions

View File

@@ -53,11 +53,20 @@ function getToken(req,res,next) {
return server.token()(req,res,next);
}
function login(req,res) {
var response = {
"type":"credentials",
"prompts":[{id:"username",type:"text",label:"Username"},{id:"password",type:"password",label:"Password"}]
}
res.json(response);
}
module.exports = {
authenticate: authenticate,
ensureClientSecret: ensureClientSecret,
authenticateClient: authenticateClient,
getToken: getToken,
errorHandler: server.errorHandler()
errorHandler: server.errorHandler(),
login: login
}