News: This forum is now permanently frozen.
Pages: [1]
Topic: Automatic Authentication (no HTML page)  (Read 2366 times)
« on: May 14, 2008, 05:02:31 »
chiclops *
Posts: 11

Hello!

I would like to control per user traffic, but I don't want them to have to authenticate every day or week. I want to remove the authentication page and do the process automatically.

I've tried to automate the form "submit" process, but it didn't work at the Portal.

I used the following HTML code:

Code:
<body>

<form method="post" action="$PORTAL_ACTION$" name="form1" id="form1">
   <input name="auth_user" type="text">
   <input name="auth_pass" type="password">
   <input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
   <input name="accept" type="submit" value="Continue">
</form>

<script>
function GO(){
setTimeout("subForm()",2500)
}

function subForm(){
document.form1.submit()
}

onload = GO
</script>

</body>


But it doesn't work. It keeps coming back to the login page rather than going to the redirection page.

Hope somebody helps me =).
« Reply #1 on: May 16, 2008, 04:10:25 »
chiclops *
Posts: 11

I found a solution that does not use the "auto-submit" feature at all, but still does the same effect (Automatic Authentication)

I have the MAC addresses of the LAN computers. So what I did was to put them all in the "MAC Pass-through" section of the Captive Portal. This assures that "subscribed" clients will automatically have Internet access without any annoying, periodical login screens.

But what about the "unsubscribed" (AKA blood sucker, AKA leecher) clients? Simple!
They get the screen that I've attached to this reply!

And here is the mega-hard-coding! (No forms!)
Code:
<html>
<head><title> Wi-Fi Network </title></head>

<body>
<br>
<div align="center">

<img src="wifilogo.png" />

</div>
</body>
</html>

Basically, it says "Computer not registered" and informs the person about my phone and apartment numbers.

So, unsubscribed and unwanted guys stay out,  friends get in automatically.  Grin

Isn't that great?  Cool


* ScreenShot046.png (107.69 KB, 1279x771 - viewed 479 times.)
« Last Edit: May 16, 2008, 04:36:58 by chiclops »
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines