middlewares

package
v0.0.0-...-11e5d33 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(h httprouter.Handle,
	startupColl *mongo.Collection,
	mentorColl *mongo.Collection) httprouter.Handle

TODO: find a better way to get collections

func GenerateNewToken

func GenerateNewToken(id string) (string, error)

Types

type UserClaim

type UserClaim struct {
	jwt.RegisteredClaims
	Id string
}

func ParseTokenStr

func ParseTokenStr(tokenString string) (UserClaim, error)

Jump to

Keyboard shortcuts

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