jwt

package
v0.0.0-...-ac733a0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(user *user.User) (string, error)

func InitKeys

func InitKeys(publicKey, privateKey string) (err error)

TODO - refactor to a "jwt" object that holds this state

func JwtUser

func JwtUser(db *sql.DB, r *http.Request) (*user.User, error)

Types

type ArchiversClaims

type ArchiversClaims struct {
	*jwt.StandardClaims
	UserId   string `json:"userId"`
	Username string `json:"username"`
	UserType string `json:"userType"`
}

ArchiversJWTClaims object

Jump to

Keyboard shortcuts

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