method

valid_per_form_csrf_token?

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ActionController::RequestForgeryProtection
valid_per_form_csrf_token?(token, session = nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 538
      def valid_per_form_csrf_token?(token, session = nil) # :doc:
        if per_form_csrf_tokens
          correct_token = per_form_csrf_token(
            session,
            request.path.chomp("/"),
            request.request_method
          )

          ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, correct_token)
        else
          false
        end
      end
Register or log in to add new notes.