Required Associated Typevapor 4.114.1Vapor
User
SessionAuthenticatable.swift:5associatedtype User : SessionAuthenticatable
associatedtype User : SessionAuthenticatable
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol SessionAuthenticator : Authenticator
Helper for creating authentication middleware in conjunction with SessionsMiddleware
.
protocol SessionAuthenticatable : Authenticatable
Models conforming to this protocol can have their authentication status cached using SessionAuthenticator
.
func authenticate(sessionID: User.SessionID, for request: Request) -> EventLoopFuture<Void>
Authenticate a model with the supplied ID.