jwt

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWT

type JWT interface {
	GenerateToken(data map[string]interface{}) (string, error)
	ValidateToken(token string) (bool, error)
	ParseToken(tokenString string) (map[string]interface{}, error)
}

func NewJWTImpl

func NewJWTImpl(signatureKey string, expiration int) JWT

type JWTImpl

type JWTImpl struct {
	SignatureKey string
	Expiration   int
}

func (*JWTImpl) GenerateToken

func (j *JWTImpl) GenerateToken(data map[string]interface{}) (string, error)

func (*JWTImpl) ParseToken

func (j *JWTImpl) ParseToken(tokenString string) (map[string]interface{}, error)

func (*JWTImpl) ValidateToken

func (j *JWTImpl) ValidateToken(tokenString string) (bool, error)

Jump to

Keyboard shortcuts

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