token

package
v0.0.0-...-1551971 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	New(userID int64, expireIn time.Duration) (Token, error)
	NewAdminToken(userID int64, expireIn time.Duration) (Token, error)
	Parse(token string) (Token, error)
	ExtractToken(req *http.Request) (Token, bool)
}

Service --

type Token

type Token interface {
	Signed() string
	ExpireAt() int64
	UserID() int64
	IsAdmin() bool
	Verify() bool
}

Token define token info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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