When failing an authentication strategy in Warden, a message can be passed to the fail! method. How can I access this message in my default failure application action such that I can display it in a flash message? I tried request.env['warden'].message, but after looking at the code for Warden::Proxy this variable is only set for winning strategies. Thoughts?
When failing an authentication strategy in Warden, a message can be passed to the
Share
Perhaps a different way of failing strategies (from recent documentation), is to use
throw(:warden, :foo => 'bar'). Anything you throw with will be available in your failure application throughrequest.env['warden.options'], including a string of the desired url as well. HTH