api

package
v0.0.0-...-ed690c2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JwtTtl           = 1 * time.Minute
	Issuer           = "momocomic-backend"
	CookieTokenEntry = "token"
	JwtExpiry        = 30 * time.Second
)

Variables

This section is empty.

Functions

func GetBookFn

func GetBookFn(cfg *config.ServerConfig) func(*gin.Context)

func IsExpired

func IsExpired(token string, key *rsa.PublicKey) (bool, error)

func RefreshTokenFn

func RefreshTokenFn(cfg *config.ServerConfig) func(*gin.Context)

func SigninFn

func SigninFn(cfg *config.ServerConfig) func(*gin.Context)

func VerifyToken

func VerifyToken(token string, key *rsa.PublicKey) (*entity.Claims, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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