vADC Forum

Reply
New Contributor
Posts: 3
Registered: ‎02-28-2014
Accepted Solution

User authentication - please help - traffic script

Please see the attachment as its not currently letting me to copy and paste into this window. My browser is not liking me today.

Contributor
Posts: 74
Registered: ‎10-03-2011

Re: User authentication - please help - traffic script

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

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.