Please see the attachment as its not currently letting me to copy and paste into this window. My browser is not liking me today.
Solved! Go to Solution.
Hi Clinton,
Your scipt is missing any code to get the username/password from the client. An example using HTTP Basic Authorization, would require something like this to be added before you run the auth.query():
$authHeader = http.getHeader("Authorization");
if ( string.startswith($authHeader, "Basic") ) {
$decode = string.base64decode( string.skip($authHeader, 6) );
$userpass = string.split($decode, ":");
} else {
http.sendResponse("401 Auth Required", "text/plain", "This resource is protected. Please log in", "WWW-Authenticate: Basic realm=\"Secure Area\"");
}
$user_name = $userpass[0];
$password = $userpass[1];
Cheers,
Mark
Hi Clinton,
Your scipt is missing any code to get the username/password from the client. An example using HTTP Basic Authorization, would require something like this to be added before you run the auth.query():
$authHeader = http.getHeader("Authorization");
if ( string.startswith($authHeader, "Basic") ) {
$decode = string.base64decode( string.skip($authHeader, 6) );
$userpass = string.split($decode, ":");
} else {
http.sendResponse("401 Auth Required", "text/plain", "This resource is protected. Please log in", "WWW-Authenticate: Basic realm=\"Secure Area\"");
}
$user_name = $userpass[0];
$password = $userpass[1];
Cheers,
Mark