jwttokener

package
v0.0.0-...-25fe3d9 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s RefreshTokenStorage) (t *tokener, err error)

Types

type JWTUserClaims

type JWTUserClaims struct {
	jwt.RegisteredClaims
	UserID string                `json:"user_id"`
	Email  string                `json:"email"`
	Roles  []interfaces.UserRole `json:"roles"`
}

type RefreshTokenStorage

type RefreshTokenStorage interface {
	SetValueByKey(ctx context.Context, key string, user []byte) error
	GetValueByKey(ctx context.Context, key string) (user []byte, err error)
	DeleteByKey(ctx context.Context, key string) error
}

Jump to

Keyboard shortcuts

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