method
valid_per_form_csrf_token?
v5.0.0.1 -
Show latest stable
- Class:
ActionController::RequestForgeryProtection
valid_per_form_csrf_token?(token, session)protected
No documentation available.
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 353
def valid_per_form_csrf_token?(token, session)
if per_form_csrf_tokens
correct_token = per_form_csrf_token(
session,
normalize_action_path(request.fullpath),
request.request_method
)
ActiveSupport::SecurityUtils.secure_compare(token, correct_token)
else
false
end
end