jwt

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Val interface{}
	jwt.RegisteredClaims
}

type Service

type Service struct {
	SecretToken                []byte
	DefaultTokenValidityInDays int
}

func (*Service) GenerateToken

func (s *Service) GenerateToken(claims *Claims) (string, error)

func (*Service) RefreshToken

func (s *Service) RefreshToken(token string, claims *Claims, expiryTimeInSeconds time.Time) (string, error)

func (*Service) ValidateToken

func (s *Service) ValidateToken(token string, claims *Claims) (*Claims, error)

Jump to

Keyboard shortcuts

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