auth

package
v0.0.0-...-9bdd6bf Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(secretKey string) (*Manager, error)

func (*Manager) NewAccessToken

func (m *Manager) NewAccessToken(userId string, ttl time.Duration) (string, error)

func (*Manager) NewRefreshToken

func (m *Manager) NewRefreshToken() (string, error)

func (*Manager) ParseAccessToken

func (m *Manager) ParseAccessToken(accessToken string) (string, error)

type TokenManager

type TokenManager interface {
	NewAccessToken(userId string, ttl time.Duration) (string, error)
	NewRefreshToken() (string, error)
	ParseAccessToken(accessToken string) (string, error)
}

Jump to

Keyboard shortcuts

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