Module: Waxx::Csrf

Extended by:
Csrf
Included in:
Csrf
Defined in:
waxx/csrf.rb

Overview

Waxx Copyright © 2016 ePark labs Inc. & Daniel J. Fitzpatrick <dan@eparklabs.com> All rights reserved. Released under the Apache Version 2 License. See LICENSE.txt.

Instance Method Summary collapse

Instance Method Details

#ht(x) ⇒ Object



11
12
13
# File 'waxx/csrf.rb', line 11

def ht(x)
  %(<input type="hidden" name="csrf" value="#{x.usr['uk']}">)
end

#ok?(x) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'waxx/csrf.rb', line 7

def ok?(x)
  x['csrf'] == x.usr['uk']
end