Required Instance Methodvapor 4.114.1Vapor
authenticate(sessionID:for:)
Authenticate a model with the supplied ID.
func authenticate(sessionID: User.SessionID, for request: Request) -> EventLoopFuture<Void>
Authenticate a model with the supplied ID.
func authenticate(sessionID: User.SessionID, for request: Request) -> EventLoopFuture<Void>
s5Vapor20SessionAuthenticatorP12authenticate9sessionID3for7NIOCore15EventLoopFutureCyytG4User_0bF0QZ_AA7RequestCtF
What are these?1EWEA
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
.
associatedtype User : SessionAuthenticatable
associatedtype SessionID : LosslessStringConvertible
Session identifier type.
final class Request
Represents an HTTP request in an application.
final class EventLoopFuture<Value>
Holder for a result that will be provided later.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.