module Roda::RodaPlugins::Csrf::InstanceMethods

Public Instance Methods

csrf_field() click to toggle source

The name of the hidden/meta csrf tag.

# File lib/roda/plugins/csrf.rb, line 32
def csrf_field
  CSRF.field
end
csrf_header() click to toggle source

The http header name to use for submitting csrf token via headers.

# File lib/roda/plugins/csrf.rb, line 37
def csrf_header
  CSRF.header
end
csrf_metatag(opts={}) click to toggle source

An html meta tag string containing the token.

# File lib/roda/plugins/csrf.rb, line 42
def csrf_metatag(opts={})
  CSRF.metatag(env, opts)
end
csrf_tag() click to toggle source

An html hidden input tag string containing the token.

# File lib/roda/plugins/csrf.rb, line 47
def csrf_tag
  CSRF.tag(env)
end
csrf_token() click to toggle source

The value of the csrf token.

# File lib/roda/plugins/csrf.rb, line 52
def csrf_token
  CSRF.token(env)
end