jwt

package
v0.0.0-...-598afe9 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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)

Types

type JWTClaims

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

Jump to

Keyboard shortcuts

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