class Warden::Strategies::Base

def redirect!(url, params = {}, opts = {})

:api: public

available options: permanent => (true || false)
opts - Any options to redirect with.
params - Any parameters to encode into the URL
url - The string representing the URL to be redirected to
Parameters:

Causes the authentication to redirect. An :warden symbol must be thrown to actually execute this redirect
def redirect!(url, params = {}, opts = {})
  halt!
  @status = opts[:permanent] ? 301 : 302
  headers["Location"] = url.dup
  headers["Location"] << "?" << Rack::Utils.build_query(params) unless params.empty?
  headers["Content-Type"] = opts[:content_type] || 'text/plain'
  @message = opts[:message] || "You are being redirected to #{headers["Location"]}"
  @result = :redirect
  headers["Location"]
end