Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: user authentication

by Juerd (Abbot)
on Jun 15, 2004 at 18:51 UTC ( #367002=note: print w/ replies, xml ) Need Help??


in reply to user authentication

what is the best method for user authentication

That depends on what you need. If you need security, SSL (https) fixes those things outside of the programming language, allowing you to focus on the easier things. One easy way to implement authentication is HTTP Basic authentication. This usually generates a dialog window that asks the user for username and password. The biggest drawback is that there isn't an easy and solid way to log out: a user stays logged in for as long as the browser remembers the password, which is usually as long as the browser has a window open. If that is a problem, cookies + sessions are probably what you're looking for. In that case, you'll have to do a lot more.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


Comment on Re: user authentication
Re^2: user authentication
by matija (Priest) on Jun 15, 2004 at 20:07 UTC
    It's not hard to log out the user at all:
    Just return the status code RC_UNAUTHORIZED (401) and most browsers will forget the username/password combination.

      Just return the status code RC_UNAUTHORIZED (401) and most browsers will forget the username/password combination.

      And prompt for a new one.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://367002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-07-23 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (136 votes), past polls