method

valid_per_form_csrf_token?

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ActionController::RequestForgeryProtection
valid_per_form_csrf_token?(token, session) 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 434
      def valid_per_form_csrf_token?(token, session) # :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.