helper

package
v0.0.0-...-f81473c Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CheckUserType

func CheckUserType(ctx *fiber.Ctx, role string) (err error)

func GetAllTokens

func GetAllTokens(user model.TokenizedUserParams) (string, string, error)

func MatchUserTypeToUID

func MatchUserTypeToUID(ctx *fiber.Ctx, userId string) error

MatchUserTypeToUID : Match Role to userid

Types

type SignedParams

type SignedParams struct {
	User model.TokenizedUserParams
	jwt.RegisteredClaims
}

func ValidateToken

func ValidateToken(token string) (*SignedParams, error)

ValidateToken validates a token

Jump to

Keyboard shortcuts

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