Module Login::ControllerIntegration::ClassMethods
In: lib/login/controller_integration.rb

Methods available as macro-style methods on any controller

Methods

Public Instance methods

Sets up the controller so that authentication is required. If the user is not authenticated then they will be redirected to the login screen.

The page requested will be saved so that once the login has occured they will be sent back to the page they first requested. If no page was requested (they went to the login page directly) then they will be directed to profiles/home after login which is a placeholder for the app to override.

Options given are passed directly to the before_filter method so feel free to provide :only and :except options.

[Source]

    # File lib/login/controller_integration.rb, line 28
28:       def authentication_required(*options)
29:         before_filter :require_authentication, options
30:       end

Will remove authentication from certain actions. Options given are passed directly to skip_before_filter so feel free to use :only and :except options.

This method is useful in cases where you have locked down the entire application by putting authentication_required in your ApplicationController but then want to open an action back up in a specific controller.

[Source]

    # File lib/login/controller_integration.rb, line 40
40:       def no_authentication_required(*options)
41:         skip_before_filter :require_authentication, options
42:       end

[Validate]