Skip to content

Commit

Permalink
Deprecates message from process_unauthenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
zedtux committed Feb 6, 2025
1 parent b14a97c commit ecfaec0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/warden/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def process_unauthenticated(env, options={})
proxy = env['warden']
result = options[:result] || proxy.result

if options.key?(:message)
warn "NOTE: Sending :message to redirect! is deprecated, use :messages instead."
options[:messages] = Array(options.delete(:message))
end

case result
when :redirect
body = proxy.messages || ["You are being redirected to #{proxy.headers['Location']}"]
Expand Down

0 comments on commit ecfaec0

Please sign in to comment.