Back to godoc.org

Package jwt

v0.0.0-...-598afe9
Latest Go to latest

The highest tagged major version is .

Published: Mar 12, 2019 | License: Apache-2.0 | Module: github.com/Fallensouls/Pandora

Index

func Authenticator

func Authenticator() gin.HandlerFunc

Authenticator checks whether user is authenticated.

func GenerateAccessJWT

func GenerateAccessJWT(id int64) (string, error)

func GenerateRefreshJWT

func GenerateRefreshJWT(id int64) (string, error)

func ValidateAccessJWT

func ValidateAccessJWT(token string) (int64, int64, error)

func ValidateRefreshJWT

func ValidateRefreshJWT(token string) (int64, int64, error)

type JWTClaims

type JWTClaims struct {
	jwt.StandardClaims
	Id int64 `json:"id"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier