Module: Roda::RodaPlugins::Csrf::InstanceMethods
- Defined in:
- lib/roda/plugins/csrf.rb
Instance Method Summary collapse
-
#csrf_field ⇒ Object
The name of the hidden/meta csrf tag.
-
#csrf_header ⇒ Object
The http header name to use for submitting csrf token via headers.
-
#csrf_metatag(opts = {}) ⇒ Object
An html meta tag string containing the token.
-
#csrf_tag ⇒ Object
An html hidden input tag string containing the token.
-
#csrf_token ⇒ Object
The value of the csrf token.
Instance Method Details
#csrf_field ⇒ Object
The name of the hidden/meta csrf tag.
32 33 34 |
# File 'lib/roda/plugins/csrf.rb', line 32 def csrf_field CSRF.field end |
#csrf_header ⇒ Object
The http header name to use for submitting csrf token via headers.
37 38 39 |
# File 'lib/roda/plugins/csrf.rb', line 37 def csrf_header CSRF.header end |
#csrf_metatag(opts = {}) ⇒ Object
An html meta tag string containing the token.
42 43 44 |
# File 'lib/roda/plugins/csrf.rb', line 42 def (opts={}) CSRF.(env, opts) end |
#csrf_tag ⇒ Object
An html hidden input tag string containing the token.
47 48 49 |
# File 'lib/roda/plugins/csrf.rb', line 47 def csrf_tag CSRF.tag(env) end |
#csrf_token ⇒ Object
The value of the csrf token.
52 53 54 |
# File 'lib/roda/plugins/csrf.rb', line 52 def csrf_token CSRF.token(env) end |