Module: SignedForm

Defined in:
lib/signed_form.rb,
lib/signed_form/hmac.rb,
lib/signed_form/errors.rb,
lib/signed_form/engine.rb,
lib/signed_form/version.rb,
lib/signed_form/digestor.rb,
lib/signed_form/gate_keeper.rb,
lib/signed_form/test_helper.rb,
lib/signed_form/form_builder.rb,
lib/signed_form/digest_stores.rb,
lib/signed_form/action_view/form_helper.rb,
lib/signed_form/digest_stores/null_store.rb,
lib/signed_form/digest_stores/memory_store.rb,
lib/signed_form/action_controller/permit_signed_params.rb

Defined Under Namespace

Modules: ActionController, ActionView, DigestStores, Errors, FormBuilder, Rails, TestHelper Classes: Digestor, GateKeeper, HMAC

Constant Summary collapse

DEFAULT_OPTIONS =
{
  sign_destination:    true,
  digest:              true,
  digest_grace_period: 300,
  signed:              false
}.freeze
MAJOR =
0
MINOR =
3
PATCH =
0
PRE =
nil
VERSION =
[MAJOR, MINOR, PATCH, PRE].compact.join '.'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.digest_storeObject


32
33
34
# File 'lib/signed_form.rb', line 32

def digest_store
  @digest_store ||= SignedForm::DigestStores::NullStore.new
end

.optionsObject


27
28
29
# File 'lib/signed_form.rb', line 27

def options
  @options ||= DEFAULT_OPTIONS.dup
end

.secret_keyObject

Returns the value of attribute secret_key


24
25
26
# File 'lib/signed_form.rb', line 24

def secret_key
  @secret_key
end

Class Method Details

.config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (SignedForm)

    the object that the method was called on


36
37
38
# File 'lib/signed_form.rb', line 36

def config
  yield self
end