• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic authentication system

#17
[eluser]n0xie[/eluser]
[quote author="Huji" date="1244765655"] Then if authentication was successfull, I would have to redirect to /private/ and this redirect thing is what I want to avoid.
[/quote]
Why?

[quote author="Huji" date="1244765655"]
You can't maintain the posted data in a redirect easily, so I don't want a redirect to take place.
[/quote]
What POST data would you want to maintain? The only POST data is the username/pw combo. If the user is logged in successful, there is no need for this POST data any more. If the username/pw was incorrect, you would handle that in the '/login' controller which does have access to the POST data (so you can repopulate the form just like you want.) The decoupling of the login credentials concern with the rest of your website is a good thing. If you ever decide to change the way people log in, you'd have to go over ALL your controllers to change the code. This way you only have to worry about 1 controller. Let's say you want to add OpenID support. You just add it as a method to your login controller and you're done.

I don't really understand what the problem is, maybe you can explain it more clearly, since to me it sounds like you have problems that aren't really problems.


Messages In This Thread
Basic authentication system - by El Forum - 06-09-2009, 01:17 PM
Basic authentication system - by El Forum - 06-09-2009, 01:33 PM
Basic authentication system - by El Forum - 06-09-2009, 01:34 PM
Basic authentication system - by El Forum - 06-10-2009, 06:40 AM
Basic authentication system - by El Forum - 06-10-2009, 08:07 AM
Basic authentication system - by El Forum - 06-10-2009, 08:11 AM
Basic authentication system - by El Forum - 06-10-2009, 08:14 AM
Basic authentication system - by El Forum - 06-10-2009, 01:01 PM
Basic authentication system - by El Forum - 06-10-2009, 01:28 PM
Basic authentication system - by El Forum - 06-10-2009, 01:35 PM
Basic authentication system - by El Forum - 06-10-2009, 01:45 PM
Basic authentication system - by El Forum - 06-10-2009, 01:49 PM
Basic authentication system - by El Forum - 06-10-2009, 01:51 PM
Basic authentication system - by El Forum - 06-10-2009, 02:42 PM
Basic authentication system - by El Forum - 06-11-2009, 01:14 PM
Basic authentication system - by El Forum - 06-11-2009, 02:47 PM
Basic authentication system - by El Forum - 06-12-2009, 02:49 AM
Basic authentication system - by El Forum - 06-14-2009, 06:37 AM
Basic authentication system - by El Forum - 06-14-2009, 10:51 AM
Basic authentication system - by El Forum - 06-14-2009, 01:45 PM
Basic authentication system - by El Forum - 06-14-2009, 03:35 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.