Vapor Documentation Beta

Protocol Session​Driver

public protocol SessionDriver

Capable of managing CRUD operations for Sessions.

%3 SessionDriver SessionDriver MemorySessions MemorySessions MemorySessions->SessionDriver

Types Conforming to Session​Driver

MemorySessions

Simple in-memory sessions implementation.

Requirements

create​Session(_:​for:​)

func createSession(_ data: SessionData, for request: Request) -> EventLoopFuture<SessionID>

read​Session(_:​for:​)

func readSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<SessionData?>

update​Session(_:​to:​for:​)

func updateSession(_ sessionID: SessionID, to data: SessionData, for request: Request) -> EventLoopFuture<SessionID>

delete​Session(_:​for:​)

func deleteSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<Void>