HP (Hewlett-Packard) MSM7XX Switch User Manual


 
Working with public access attributes
Public access interface ASP functions and variables
To avoid having the user login once registration is complete, the registration Web server can
send the user back to the service controller using a special URL that automatically logs the
user into the public access interface.
This is not a normal return value. It cannot be assigned to an ASP variable, and is inserted
directly into the HTML page.
Example
Assuming the registration server is 192.169.30.1, the register button code on the Login page
might look something like this:
<FORM><INPUT
onclick="javascript:window.location='https://192.168.30.1/demo-php/
register.php?
NASip=<%GetNasAddress();%>&NASid=<%GetRadiusNasId();%>';"
type=button value="Click Here to Register">
</FORM>
The NAS ID and NAS address are required when the user is redirected back to the service
controller after registration. The code on the registration Web page would look something
like this:
// Registering user information in the backend database
RegisterUser($username,
$firstname,
$lastname,
$company,
$title,
$phone,
$email,
$NASid, // identifies the service controller the user is connected to
$NASip
);
// set URL to redirect browser to
$targetURL = "location: https://
" . $NASip . ":8090/goform/HtmlLoginRequest?
username=" . $username . "&password=" . $password;
// When done
header($targetURL);
The target URL is built using the NAS IP and username and password. The form name is hard-
coded.
Page URLs
GetFailRetryUrl()
Returns the URL of the next internal page to display as follows:
Returns the Fail page URL if a login or logout request is currently pending.
Returns the Transport page URL if the user is already logged in.
9-76