authn

package
v0.0.0-...-c8a7627 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken     = errors.New("invalid token")
	ErrTokenUnknownType = errors.New("unknown token type")
)

Functions

This section is empty.

Types

type ClientAPIToken

type ClientAPIToken struct {
	jwt.RegisteredClaims
}

type TokenService

type TokenService struct {
	Conf *config.ClientToken
}

func NewTokenService

func NewTokenService(conf *config.ClientToken) *TokenService

func (*TokenService) IssueToken

func (ts *TokenService) IssueToken() (string, error)

func (*TokenService) ValidateToken

func (ts *TokenService) ValidateToken(clientJWT string) (*ClientAPIToken, error)

type TokenValidator

type TokenValidator interface {
	ValidateToken(clientJWT string) (*ClientAPIToken, error)
}

Jump to

Keyboard shortcuts

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