auth

package
v0.0.0-...-30a6304 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 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 Manager

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

func NewManager

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

func (*Manager) NewJWT

func (m *Manager) NewJWT(id int, clientType string, ttl time.Duration) (string, error)

func (*Manager) Parse

func (m *Manager) Parse(accessToken string) (int, string, error)

type TokenManager

type TokenManager interface {
	NewJWT(id int, clientType string, ttl time.Duration) (string, error)
	Parse(accessToken string) (int, string, error)
}

Jump to

Keyboard shortcuts

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