SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Question Regarding Authentication

    Is there something I can use so I don't have to call a method that checks if the user is logged in inside of all my methods I want user authentication on?
    Have a good day.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,427
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    Maybe Restful Authentication?
    http://railsonedge.blogspot.com/2008...ationpart.html

    While following the tutorial, I installed the plugin and made the changes as per the tutorial's instructions and everything worked fine.

  3. #3
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Darren884 View Post
    Is there something I can use so I don't have to call a method that checks if the user is logged in inside of all my methods I want user authentication on?
    if you create a helper that checks for logged in status and redirects to a login page if not, you could use a "before filter" at the top of the controller to make sure that code executes before the controller starts on the action.

  4. #4
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys I think I will try both and see which one works best.
    Have a good day.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •