jwt

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpiredToken = errors.New("auth token expired")
View Source
var ErrInvalidToken = errors.New("auth token invalid")

Functions

This section is empty.

Types

type Claims

type Claims interface {
	GetId() uuid.UUID
	GetIssuer() string
	GetTenant() string
	Expired() bool
}

type Jwt

type Jwt interface {
	Generate(issuer, tenant string, duration time.Duration) (string, error)
	Validate(token string) (Claims, error)
}

func Init

func Init(secret string) (Jwt, error)

Jump to

Keyboard shortcuts

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