Setup guide

concatenation of the following: chap-id, the password of the user and chap-challenge (in the given
order)
The gateway uses CHAP authentication in case client's browser is hashing his/her pasword (in other
words, if the main variable was initialized successfully befor the form is being submitted). In case
plain-text password has been sent, PAP authentication algorithm is used. So if you want to force
PAP-only authentication, you must remove the main variable from the servlet (of course, you must
also allow the gateway to accept unencrypted passwords, or otherwise no one would be able to
login at all).
In case if variables are to be used in link directly, then they must be escaped accordingly. For
example, in login page??<a
href="https://login.example.com/login?mac=%mac%&user=%user%">link</a> will not work as
intended, if username will be "123&456=1 2". In this case instead of %user%, its escaped version
must be used: %user-esc%: <a
href="https://login.server.serv/login?mac=%mac-esc%&user=%user-esc%">link</a>. Now the
same username will be converted to "123%26456%3D1+2", which is the valid representation of
"123&456=1 2" in URL. This trick may be used with any variables, not only with %user%.
Example
With basic HTML language knowledge and the examples below it should be easy to implement the
ideas described above.
• To provide predefined value as username, in login.html change:
<input type="text" %input-user%>
to this line:
<input type="hidden" name="user" value="hsuser">
(where hsuser is the username you are providing)
• To provide predefined value as password, in login.html change:
<input type="password" %input-password%>
to this line:
<input type="hidden" name="password" value="hspass">
(where hspass is the password you are providing)
• To send client's MAC address to a registration server in form of:
https://www.server.serv/register.html?mac=XX:XX:XX:XX:XX:XX
change the Login button link in login.html to:
https://www.server.serv/register.html?mac=%mac%
(you should correct the link to point to your server)
• To show a banner after user login, in alogin.html after
if ('%popup%' == 'true') newWindow();
add the following line:
open('http://your.web.server/your-banner-page.html', 'my-banner-name','');
(you should correct the link to point to the you want to show)
• To choose different shown after login, in login.html change:
<input type="hidden" name="dst" value="%link-orig%">
to this line:
<input type="hidden" name="dst" value="http://your.web.server">
(you should correct the link to point to your server)
Possible Error Messages