method

extract_from_metadata_envelope

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: Metadata
extract_from_metadata_envelope(envelope, purpose: nil) private

No documentation

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

Hide source
# File activesupport/lib/active_support/messages/metadata.rb, line 78
        def extract_from_metadata_envelope(envelope, purpose: nil)
          hash = envelope["_rails"]

          if hash["exp"] && Time.now.utc >= parse_expiry(hash["exp"])
            throw :invalid_message_content, "expired"
          end

          if hash["pur"].to_s != purpose.to_s
            throw :invalid_message_content, "mismatched purpose"
          end

          hash
        end
Register or log in to add new notes.