lib/roda/plugins/route_csrf.rb
def csrf_token(path=nil, method=('POST' if path))
          token = SecureRandom.random_bytes(31)
          token << csrf_hmac(token, method, path)
          Base64.strict_encode64(token)
        end
# The value of the csrf token.  For a path specific token, provide a path
# argument.  By default, it a path is provided, the POST request method will
# be assumed.  To generate a token for a non-POST request method, pass the
# method as the second argument.
The value of the csrf token.  For a path specific token, provide a path
argument.  By default, it a path is provided, the POST request method will
be assumed.  To generate a token for a non-POST request method, pass the
method as the second argument.
The value of the csrf token . For a path specific token provide a path argument . By default it a path is provided the POST request method will be assumed . To generate a token for a non - POST request method pass the method as the second argument .
def csrf_token(path=nil, method=('POST' if path))
          token = SecureRandom.random_bytes(31)
          token << csrf_hmac(token, method, path)
          Base64.strict_encode64(token)
        end
def csrf_token ( path = nil , method = ( 'POST' if path ) ) token = SecureRandom . random_bytes ( 31 ) token << csrf_hmac ( token , method , path ) Base64 . strict_encode64 ( token ) end
The value of the csrf token.
The value of the csrf token .
path
method