Vapor Documentation Beta

Protocol Authenticator

public protocol Authenticator: Middleware

Helper for creating authentication middleware.

See RequestAuthenticator and SessionAuthenticator for more information.

%3 Authenticator Authenticator Middleware Middleware Authenticator->Middleware RequestAuthenticator RequestAuthenticator RequestAuthenticator->Authenticator SessionAuthenticator SessionAuthenticator SessionAuthenticator->Authenticator

Conforms To


Middleware is placed between the server and your router. It is capable of mutating both incoming requests and outgoing responses. Middleware can choose to pass requests on to the next Middleware in a chain, or they can short circuit and return a custom Response if desired.

Types Conforming to Authenticator


Help for creating authentication middleware based on Request.


Helper for creating authentication middleware in conjunction with SessionsMiddleware.