Instance Methodhummingbird-auth 2.0.1HummingbirdAuth
authenticate(request:context:)
SessionAuthenticator.swift:50func authenticate(request: Request, context: Context) async throws -> Repository.User?
func authenticate(request: Request, context: Context) async throws -> Repository.User?
s15HummingbirdAuth20SessionAuthenticatorV12authenticate7request7context8IdentityAA0B14RequestContextPQzSg0A4Core0I0V_xtYaKF
What are these?FEAS
import HummingbirdAuth
struct SessionAuthenticator<Context, Repository> where Context : AuthRequestContext, Context : SessionRequestContext, Repository : UserSessionRepository, Context.Identity == Repository.User, Context.Session == Repository.Identifier
Session authenticator
struct Request
Holds all the values required to process a request
associatedtype User : Sendable
init<Session>(context: Context.Type = Context.self, getUser: @escaping (Session, UserRepositoryContext) async throws -> Context.Identity?) where Repository == UserSessionClosureRepository<Session, Context.Identity>, Session == Context.Session
Initialize SessionAuthenticator middleware
init(users: Repository, context: Context.Type = Context.self)
Initialize SessionAuthenticator middleware
let users: Repository
User repository
typealias Identity = Context.Identity