Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Macro

AuthMiddleware(_:_:body:)

Groups route handlers with authentication middleware inside a @Controller.
@freestanding(declaration) macro AuthMiddleware<T>(_ authenticationType: T.Type, _ middleware: any Middleware..., body: () -> Void) where T : Authenticatable