auth

package
v0.0.0-...-336782b Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ENV_PATH = "../../.env"

Variables

View Source
var SECRET_KEY = os.Getenv("JWT_SECRET_KEY")

Functions

func NewJWTService

func NewJWTService() *jwtService

func ParseToken

func ParseToken(tokeString string) (id string, err error)

Types

type Service

type Service interface {
	GenerateToken(userID string) (string, error)
	ValidateToken(encodedToken string) (*jwt.Token, error)
}

Jump to

Keyboard shortcuts

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