Documentation
¶
Overview ¶
Package auth holds the authentication library
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrJWTMissingInvalid is returned when the JWT is missing or invalid ErrJWTMissingInvalid = errors.New("JWT token missing or invalid") // ErrJWTClaimsInvalid is returned when the token could not be cast to jwt.MapClaims ErrJWTClaimsInvalid = errors.New("JWT claims missing or invalid") // ErrSubjectNotFound is returned when the sub is not found in the JWT claims ErrSubjectNotFound = errors.New("JWT claims missing subject") )
Functions ¶
func CreateJwtMiddleware ¶
func CreateJwtMiddleware(secret []byte) echo.MiddlewareFunc
CreateJwtMiddleware creates a middleware function for JWTs TODO expand the config settings
func GetActorSubject ¶
GetActorSubject returns the user from the echo.Context
func GetUserIDFromContext ¶
GetUserIDFromContext returns the actor subject from the echo context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.