jwt

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenManager

type TokenManager struct {
	// contains filtered or unexported fields
}

TokenManager JWT реализация интерфейса token.Manager

func New

func New(key string, expirationTime time.Duration) (*TokenManager, error)

New возвращает новый JWT TokenManager

func (*TokenManager) Create

func (m *TokenManager) Create(userID int) (string, error)

Create возвращает новый JWT токен

func (*TokenManager) Validate

func (m *TokenManager) Validate(accessToken string) (*token.Payload, error)

Validate проверяет JWT токен на валидность

Jump to

Keyboard shortcuts

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