Skip to content

Commit

Permalink
Rename __validate alias to __validate_datadog_authenticatable
Browse files Browse the repository at this point in the history
  • Loading branch information
y9v committed Aug 28, 2024
1 parent d3905a4 commit 5850767
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/appsec/contrib/devise/patcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def patch
end

def patch_authenticatable_strategy
::Devise::Strategies::Authenticatable.alias_method(:__validate, :validate)
::Devise::Strategies::Authenticatable.alias_method(:__validate_datadog_authenticatable, :validate)
::Devise::Strategies::Authenticatable.prepend(AuthenticatablePatch)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Patcher
# Rememberable strategy as Login Success events.
module RememberablePatch
def validate(*args)
__validate(*args)
__validate_datadog_authenticatable(*args)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def validate(resource, &block)
@result
end

alias_method :__validate, :validate
alias_method :__validate_datadog_authenticatable, :validate

prepend Datadog::AppSec::Contrib::Devise::Patcher::AuthenticatablePatch
prepend Datadog::AppSec::Contrib::Devise::Patcher::RememberablePatch
Expand Down

0 comments on commit 5850767

Please sign in to comment.