You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

request.rb 683B

12345678910111213141516171819202122232425
  1. # frozen_string_literal: false
  2. module OpenIdAuthentication
  3. module Request
  4. def self.included(base)
  5. base.alias_method_chain :request_method, :openid
  6. end
  7. def request_method_with_openid
  8. if !parameters[:_method].blank? && parameters[:open_id_complete] == '1'
  9. parameters[:_method].to_sym
  10. else
  11. request_method_without_openid
  12. end
  13. end
  14. end
  15. end
  16. # In Rails 2.3, the request object has been renamed
  17. # from AbstractRequest to Request
  18. if defined? ActionController::Request
  19. ActionController::Request.send :include, OpenIdAuthentication::Request
  20. else
  21. ActionController::AbstractRequest.send :include, OpenIdAuthentication::Request
  22. end