auth

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const AuthCookieName = "Authentication"
View Source
const RefreshCookieName = "RefreshAuthentication"

Variables

This section is empty.

Functions

func DeleteAuthToken

func DeleteAuthToken(w http.ResponseWriter)

func DeleteRefreshToken

func DeleteRefreshToken(w http.ResponseWriter)

func GenerateAuthToken

func GenerateAuthToken(w http.ResponseWriter, user *users.User)

func GenerateRefreshToken

func GenerateRefreshToken(w http.ResponseWriter, user *users.User)

func SetConfig

func SetConfig(c *conf.Config)

Types

type Claims

type Claims struct {
	DisplayName string `json:"display"`
	Role        string `json:"role"`
	jwt.StandardClaims
}

func GetAuthToken

func GetAuthToken(r *http.Request) (*Claims, error)

type RefreshClaims

type RefreshClaims struct {
	jwt.StandardClaims
}

func GetRefreshToken

func GetRefreshToken(r *http.Request) (*RefreshClaims, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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