Categorygithub.com/macaron-contrib/csrf
modulepackage
0.0.0-20150204170914-98ddf5a71009
Repository: https://github.com/macaron-contrib/csrf.git
Documentation: pkg.go.dev

# README

csrf Build Status

Middleware csrf generates and validates CSRF tokens for Macaron.

API Reference

Installation

go get github.com/macaron-contrib/csrf

Getting Help

License

This project is under Apache v2 License. See the LICENSE file for the full license text.

# Functions

Csrfer maps CSRF to each request.
Generate maps CSRF to each request.
GenerateToken returns a URL-safe secure XSRF token that expires in 24 hours.
Validate should be used as a per route middleware.
Valid returns true if token is a valid, unexpired token returned by Generate.
No description provided by the author

# Constants

The duration that XSRF tokens are valid.

# Structs

Options maintains options to manage behavior of Generate.

# Interfaces

CSRF represents a CSRF service and is used to get the current token and validate a suspect token.