usertokenmanagerinters

package
v0.0.0-...-941b1c8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTDataStorage

type JWTDataStorage interface {
	Record(ctx context.Context, key string, expiration time.Duration) error
	Exists(ctx context.Context, key string) (t bool, err error)
}

type UserTokenInfo

type UserTokenInfo struct {
	ID         uint64
	UserName   string
	StartAt    time.Time
	Expiration time.Duration
}

type UserTokenManager

type UserTokenManager interface {
	GenToken(ctx context.Context, userInfo *UserTokenInfo) (string, bizuserinters.Status)
	ExplainToken(ctx context.Context, token string) (*UserTokenInfo, bizuserinters.Status)
	RenewToken(ctx context.Context, token string) (string, *UserTokenInfo, bizuserinters.Status)

	GenSSOToken(ctx context.Context, parentToken string, expiration time.Duration) (string, bizuserinters.Status)
	ExplainSSOToken(ctx context.Context, token string) (*UserTokenInfo, bizuserinters.Status)

	DeleteToken(ctx context.Context, token string) bizuserinters.Status
}

Jump to

Keyboard shortcuts

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