How to customize Http Digest Authentication error pages in Ruby on Rails
Full details see: http://p373.net/2013/11/16/how-to-customize-http-digest-authentication-error-pages-in-ruby-on-rails/
module ActionController
module HttpAuthentication
module Digest
def authentication_request_with_customization(controller, realm, message=nil)
message = controller.render_to_string("public/401.html")
authentication_request_without_customization(controller, realm, message)
end
alias_method_chain :authentication_request, :customization
end
end
Written by Peter Philips
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#