Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CsrfFilter ¶
func CsrfFilter(c *revel.Controller, fc []revel.Filter)
CsrfFilter enables CSRF request token creation and verification.
Usage:
- Add `csrf.CsrfFilter` to the app's filters (it must come after the revel.SessionFilter).
- Add CSRF fields to a form with the template tag `{{ csrftoken . }}`.
The filter adds a function closure to the `ViewArgs` that can pull out the secret and make the token as-needed, caching the value in the request. Ajax support provided through the `X-CSRFToken` header.
func IsExempt ¶
func IsExempt(c *revel.Controller) bool
func MarkExempt ¶
func MarkExempt(route string)
func RandomString ¶
func RefreshToken ¶
func RefreshToken(c *revel.Controller) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.