api

package
v0.0.0-...-ebba24f Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 14 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 AddFn

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

func IsExpired

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

func ListFn

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

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