Skip to content

BasicAuthMiddleware

Josh Wright edited this page Jan 14, 2021 · 3 revisions

BasicAuthMiddleware

A Middleware type configured to work with BasicAuthable. This middleware will intercept requests and queries the table backing B for a row matching the basic auth headers of the request. If a matching row is found, that value will be associated with the request. If there is no Authentication:​ Basic ... header, or the basic auth values don't match a row in the database, an HTTPError(.unauthorized) will be thrown.

public struct BasicAuthMiddleware<B: BasicAuthable>: Middleware

Inheritance

Middleware

Methods

intercept(_:next:)

public func intercept(_ request: Request, next: @escaping Next) -> EventLoopFuture<Response>
Alchemy
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Fusion
Types
Protocols
Papyrus
Types
Protocols
Clone this wiki locally