Documentation ¶
Index ¶
- func ExtractUserFromContext(ctx context.Context) (*models.User, error)
- func ExtractUserFromEchoContext(ec echo.Context) (*models.User, error)
- func ExtractUserMiddleware(db mongodb.DatabaseWrapper) echo.MiddlewareFunc
- func NewJWTWithCustomClaims(userID primitive.ObjectID) (string, error)
- type CustomClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractUserFromContext ¶
func ExtractUserMiddleware ¶
func ExtractUserMiddleware(db mongodb.DatabaseWrapper) echo.MiddlewareFunc
Types ¶
type CustomClaims ¶
type CustomClaims struct { UserID primitive.ObjectID `json:"userID"` jwt.StandardClaims }
func ParseJWTWithCustomClaims ¶
func ParseJWTWithCustomClaims(tokenString string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.