class

Amber::Pipe::CSRF

Inherits Amber::Pipe::Base < HTTP::Handler < Reference < Object

The CSRF Handler adds support for Cross Site Request Forgery.

Constants

CHECK_METHODS = ["PUT", "POST", "PATCH", "DELETE"] of ::String
CSRF_KEY = "csrf.token"
HEADER_KEY = "X-CSRF-TOKEN"
PARAM_KEY = "_csrf"
TOKEN_LENGTH = 32

Class methods

metatag(context)
Source
tag(context)
Source
token(context)
Source
token_strategy
Source
token_strategy=(token_strategy : PersistentToken | RefreshableToken)
Source

Instance methods

call(context : HTTP::Server::Context)

Execution of this handler.

Source
valid_http_method?(context)
Source

Nested types