vendredi 26 janvier 2018

Override method Ruby

I would like to override the method: authorize_endpoint_url from the Gem in a Rails application: https://github.com/AzureAD/omniauth-azure-activedirectory/blob/master/lib/omniauth/strategies/azure_activedirectory.rb

I tried to do it by adding a file to config/initializers/oauth.rb

With the code:

module OmniAuth
  module Strategies
    # A strategy for authentication against Azure Active Directory.
    class AzureActiveDirectory
      def request_phase
        debugger
        "www.hans.com"
      end
    end
  end
end

But this approach doesn't seem to work, nothing get's actually overwriten. What do I wrong? Thank you

Aucun commentaire:

Enregistrer un commentaire