Vapor Documentation Beta

Protocol Session​Authenticator

public protocol SessionAuthenticator: Authenticator

Helper for creating authentication middleware in conjunction with SessionsMiddleware.

%3 SessionAuthenticator SessionAuthenticator Authenticator Authenticator SessionAuthenticator->Authenticator

Conforms To

Authenticator

Helper for creating authentication middleware.

Requirements

authenticate(session​ID:​for:​)

func authenticate(sessionID: User.SessionID, for request: Request) -> EventLoopFuture<Void>

Authenticate a model with the supplied ID.