Class Devise::FailureApp
In: lib/devise/failure_app.rb
Parent: ActionController::Metal

Failure application that will be called every time :warden is thrown from any strategy or hook. Responsible for redirect the user to the sign in page based on current scope and mapping. If no scope is given, redirect to the default_url.

Methods

Included Modules

ActionController::RackDelegation ActionController::UrlFor ActionController::Redirecting Rails Devise::Controllers::SharedHelpers

Public Class methods

Public Instance methods

Protected Instance methods

Choose whether we should respond in a http authentication fashion, including 401 and optional headers.

This method allows the user to explicitly disable http authentication on ajax requests in case they want to redirect on failures instead of handling the errors on their own. This is useful in case your ajax API is the same as your public API and uses a format like JSON (so you cannot mark JSON as a navigational format).

It does not make sense to send authenticate headers in ajax requests or if the user disabled them.

Stores requested uri to redirect the user after signing in. We cannot use scoped session provided by warden here, since the user is not authenticated yet, but we still need to store the uri based on scope, so different scopes would never use the same uri to redirect.

[Validate]