models

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const AuthTokenValidTime = time.Minute * 15
View Source
const RefreshTokenValidTime = time.Hour * 72

Variables

This section is empty.

Functions

func GenerateCSRFSecret

func GenerateCSRFSecret() (string, error)

Types

type TokenClaims

type TokenClaims struct {
	jwt.StandardClaims
	Role string `json:"role"`
	Csrf string `json:"csrf"`
}

https://tools.ietf.org/html/rfc7519

type User

type User struct {
	Username, PasswordHash, Role string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL