class Amber::Pipe::CSRF
- Amber::Pipe::CSRF
- Amber::Pipe::Base
- Reference
- Object
Overview
The CSRF Handler adds support for Cross Site Request Forgery.
Defined in:
amber/pipes/csrf.crConstant Summary
-
CHECK_METHODS =
["PUT", "POST", "PATCH", "DELETE"] of ::String
-
CSRF_KEY =
"csrf.token"
-
HEADER_KEY =
"X-CSRF-TOKEN"
-
PARAM_KEY =
"_csrf"
-
TOKEN_LENGTH =
32
Class Method Summary
- .metatag(context)
- .tag(context)
- .token(context)
- .token_strategy : PersistentToken | RefreshableToken
- .token_strategy=(token_strategy : PersistentToken | RefreshableToken)
Instance Method Summary
-
#call(context : HTTP::Server::Context)
Execution of this handler.
- #valid_http_method?(context)
Instance methods inherited from class Amber::Pipe::Base
call(context : HTTP::Server::Context)
call
Class Method Detail
Instance Method Detail
def call(context : HTTP::Server::Context)
#
Description copied from class Amber::Pipe::Base
Execution of this handler.