Working with RADIUS attributes
Public access interface ASP functions and variables
15-80
This is not a normal return value. It cannot be assigned to an ASP variable, and is inserted
directly into the HTML page.
GetNasAddress()
Returns the fully-qualified domain name of the controller as is specified in the currently
loaded SSL certificate.
For example, in certain instances you may want users to register for an account before they
log in. To accomplish this you could modify the Login page by adding a register button. This
redirects the user’s browser to a registration Web server where they can set up their account.
(This page must be made accessible to non-authenticated users using the appropriate access
list rule.)
To avoid having the user login once registration is complete, the registration Web server can
send the user back to the 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 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 controller the user is connected to
$NASip
);
// set URL to redirect browser to
$targetURL = "location: https://
" . $NASip . ":8090/goform/HtmlLoginRequest?
username=" . $username . "&password=" . $password;