lib/rubaidh/authentication/controller.rb
def authenticate
          case request.format
          when Mime::XML, Mime::ATOM
            if user = authenticate_with_http_basic { |u, p| User.authenticate(u, p) }
              self.current_user = user
            else
              request_http_basic_authentication
            end
          else
            if !session_authenticated?
              remember_requested_location
              redirect_to(new_session_path) and return false
            end
          end
        end
# Authenticate the user using either the current session or HTTP basic auth,
# depending upon the format the request comes in on.  If it's a regular
# user and they're not logged in, redirect to a friendly login page.
Authenticate the user using either the current session or HTTP basic auth,
depending upon the format the request comes in on.  If it's a regular
user and they're not logged in, redirect to a friendly login page.
Authenticate the user using either the current session or HTTP basic auth depending upon the format the request comes in on . If it ' s a regular user and they ' re not logged in redirect to a friendly login page .
def authenticate
          case request.format
          when Mime::XML, Mime::ATOM
            if user = authenticate_with_http_basic { |u, p| User.authenticate(u, p) }
              self.current_user = user
            else
              request_http_basic_authentication
            end
          else
            if !session_authenticated?
              remember_requested_location
              redirect_to(new_session_path) and return false
            end
          end
        end
def authenticate case request . format when Mime :: XML , Mime :: ATOM if user = authenticate_with_http_basic { | u , p | User . authenticate ( u , p ) } self . current_user = user else request_http_basic_authentication end else if ! session_authenticated? remember_requested_location redirect_to ( new_session_path ) and return false end end end
Authenticate the user using either the current session or HTTP basic auth,
depending upon the format the request comes in on.
Authenticate the user using either the current session or HTTP basic auth depending upon the format the request comes in on .