Re: [SLUG] Intercepting web requests and authenticating users?

From: Derek Glidden (dglidden@illusionary.com)
Date: Wed Feb 04 2004 - 11:26:35 EST


On Feb 4, 2004, at 9:56 AM, Ben Ostrowsky wrote:

> When I go to places that offer membership-based wireless access, any
> URL I try to go to will take me to the same login/signup page. How do
> they do that? Can I do it with Free software?
>
> I assume it has something to do with the router. Redirect everything
> to a proxy that checks for authentication, unless it's coming from the
> proxy itself (and is therefore authenticated)?
>
> Revised question: is there a not-painfully-difficult way to do this
> with Free software?

I do it all the time with Free Software. It's A Simple Matter Of
Programming. (And has nothing to do with proxies or routers...)

All that needs to be done at each page is check against a session
variable (either through cookies or encoding it into the URL somehow)
whether or not the current user has logged in. If she has, then
display the page; if she hasn't, then send them to a login page.
Different languages and different frameworks all have different ways of
handling it, so there's no "one simple way" that's easy to explain. If
you know enough PHP or Java or Python or Zope or Cold Fusion or &c. to
be able to make a reasonably "interactive" web site, you should wind up
knowing enough how to do this sort of thing.

(Mini-rant for my fans: :) ) No simple way, that is, unless you're
using MS products. In which case you go into your "Microsoft Visual
Site Builder" tool and click the "Require login" and "Use sessions"
buttons when you run the "Make an enterprise web site for me" wizard.
Of course, you have no freakin' clue what the settings mean or how they
work, and the whole thing will collapse into a flaming wreck if you try
to do anything clever like try to load-balance your app on multiple
servers or if you look at it kind of funny, but it keeps thousands of
MS Web Developers in business year-in and year-out...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"We all enter this world in the | Support Electronic Freedom
same way: naked; screaming; soaked | http://www.eff.org/
in blood. But if you live your | http://www.anti-dmca.org/
life right, that kind of thing |---------------------------
doesn't have to stop there." -- Dana Gould

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:22:48 EDT