jwt

package
v0.0.0-...-0f031a4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrivateKey *rsa.PrivateKey = nil

Functions

func GenerateAccessToken

func GenerateAccessToken(sub string, claims map[string]any) ([]byte, error)

func GeneratePersonalToken

func GeneratePersonalToken(sub string, expiry time.Duration, claims map[string]any) ([]byte, error)

func GenerateRefreshToken

func GenerateRefreshToken(sub string) ([]byte, error)

func GenerateTokens

func GenerateTokens(sub string, claims map[string]any) ([]byte, []byte, error)

func ParseEncoded

func ParseEncoded(encodedToken []byte) (jwx.Token, error)

Types

type Type

type Type int8
const (
	AccessToken Type = iota + 1
	RefreshToken
	PersonalToken
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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