security

package
v0.0.0-...-57f2031 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractToken

func ExtractToken(tokenString string, jwtSecret string) (*jwt.Token, error)

func GetAuthCookie

func GetAuthCookie(req *http.Request) *http.Cookie

func SetAuthCookie

func SetAuthCookie(w http.ResponseWriter, secret string, exp time.Time, sub uuid.UUID) error

SetAuthCookie will create a jwt token and write it in a http only cookie.

func UnvalidatedAuthCookie

func UnvalidatedAuthCookie(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

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