A namespace for containing the Strategy protocol.
A namespace for containing the Strategy protocol.
Defines a strategy for protecting Ring handlers from CSRF attacks.
Defines a strategy for protecting Ring handlers from CSRF attacks.
(get-token strategy request)Returns a token to be used by the handler for a given request. The return value will be used in ring.middleware.anti-forgery/anti-forgery-token.
Returns a token to be used by the handler for a given request. The return value will be used in ring.middleware.anti-forgery/*anti-forgery-token*.
(valid-token? strategy request token)Given a request map and a token read from the request, return true if the request is valid, false otherwise.
Given a request map and a token read from the request, return true if the request is valid, false otherwise.
(write-token strategy request response token)Write the token to the response, if necessary. Some strategies require state to be stored in the session or in a cookie.
Write the token to the response, if necessary. Some strategies require state to be stored in the session or in a cookie.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |