Documentation
¶
Index ¶
- func CORSMiddleware(next http.Handler) http.Handler
- func GetUserIDFromContext(ctx context.Context) ([]uint8, error)
- func LoggingMiddleware(next http.Handler) http.Handler
- func NewAuditMiddleware() func(http.Handler) http.Handler
- func RecoveryMiddleware(next http.Handler) http.Handler
- type ContextKey
- type Middleware
- type PermissionService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
CORS headers to allow web browser testing TODO: Mejorar seguridad para prod (o sacar)
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func NewAuthMiddleware(permissionService PermissionService, userService UserService, auditService audit.AuditService) *Middleware
func (*Middleware) RequireAuthAndPermission ¶
func (m *Middleware) RequireAuthAndPermission(permissions []string, useRefreshToken bool) func(http.HandlerFunc) http.HandlerFunc
type PermissionService ¶
type UserService ¶
Click to show internal directories.
Click to hide internal directories.