Liking cljdoc? Tell your friends :D
Clojure only.

ring.middleware.anti-forgery.strategy

A namespace for containing the Strategy protocol.

A namespace for containing the Strategy protocol.
raw docstring

Strategycljprotocol

Defines a strategy for protecting Ring handlers from CSRF attacks.

Defines a strategy for protecting Ring handlers from CSRF attacks. 

get-tokenclj

(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?clj

(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-tokenclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close