Helma logo
helma.org » Home > Stories > req.password

req.password

Returns the password part of the credentials provided by the client after responding to a HTTP authentication challenge.

Forcing the client to authenticate himself is done by setting res.status = 401 and setting res.realm.
See res.status and res.realm.

Syntax
req.username

Example
if(req.username == "user" && req.password == "secret"){
  res.write("Welcome to the protected area. Feel safe.");
}
else{
  res.status = 401;
  res.realm = "auth-test";
}



Page last modified on 2003-09-11 12:27 by rist