token

package
v0.0.0-...-11fc6bb Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingHeader = errors.New("The length of the `Authorization` header is zero.")
)

Functions

func Sign

func Sign(ctx *gin.Context, c Context, secret string) (tokenString string, err error)

Types

type Context

type Context struct {
	ID       uint64
	Username string
}

func Parse

func Parse(tokenString string, secret string) (*Context, error)

func ParseRequest

func ParseRequest(c *gin.Context) (*Context, error)

Jump to

Keyboard shortcuts

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