Flowdock
method

message_verifier

Importance_2
v6.1.3.1 - Show latest stable - 0 notes - Class: Rails::Application
message_verifier(verifier_name) public

Returns a message verifier object.

This verifier can be used to generate and verify signed messages in the application.

It is recommended not to use the same verifier for different things, so you can get different verifiers passing the verifier_name argument.

Parameters

  • verifier_name - the name of the message verifier.

Examples

message = Rails.application.message_verifier('sensitive_data').generate('my sensible data')
Rails.application.message_verifier('sensitive_data').verify(message)
# => 'my sensible data'

See the +ActiveSupport::MessageVerifier+ documentation for more information.

Show source
Register or log in to add new notes.