jwtutils

package
v0.0.0-...-7a64a06 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWT

func CreateJWT(params JWTParams) (string, error)

func ParseJWT

func ParseJWT(jwtString string, params JWTParams) (string, error)

Types

type JWTInfo

type JWTInfo struct {
	Subject   string
	Issuer    string
	IssuedAt  time.Time
	ExpiresAt time.Time
}

func ExtractInfoFromJWT

func ExtractInfoFromJWT(jwtString string) (*JWTInfo, error)

type JWTParams

type JWTParams struct {
	Subject   string
	Issuer    string
	Secret    []byte
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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