Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewCorsMiddleware), fx.Provide(NewJWTMiddleware), fx.Provide(NewMiddlewares), )
Module Middleware exported
Functions ¶
This section is empty.
Types ¶
type CorsMiddleware ¶
type CorsMiddleware struct {
// contains filtered or unexported fields
}
CorsMiddleware middleware for cors
func NewCorsMiddleware ¶
func NewCorsMiddleware(handler *core.RequestHandler, logger *core.Logger, env *core.Env) *CorsMiddleware
NewCorsMiddleware creates new cors middleware
type JWTMiddleware ¶
type JWTMiddleware struct {
// contains filtered or unexported fields
}
JWTMiddleware middleware for jwt authentication
func NewJWTMiddleware ¶
func NewJWTMiddleware( env *core.Env, logger *core.Logger, service services.IAuthService, ) *JWTMiddleware
NewJWTMiddleware creates new jwt auth middleware
func (*JWTMiddleware) AuthorizationWithCookie ¶
func (m *JWTMiddleware) AuthorizationWithCookie() gin.HandlerFunc
func (*JWTMiddleware) Handler ¶
func (m *JWTMiddleware) Handler() gin.HandlerFunc
Handler handles middleware functionality
type Middlewares ¶
type Middlewares []IMiddleware
Middlewares contains multiple middleware
func NewMiddlewares ¶
func NewMiddlewares( corsMiddleware *CorsMiddleware, jwtMiddleware *JWTMiddleware, ) Middlewares
NewMiddlewares creates new middlewares Register the middleware that should be applied directly (globally)
Click to show internal directories.
Click to hide internal directories.