Vapor Documentation Beta

Protocol Bearer​Authenticator

public protocol BearerAuthenticator: RequestAuthenticator

Helper for creating authentication middleware using the Bearer authorization header.

%3 BearerAuthenticator BearerAuthenticator RequestAuthenticator RequestAuthenticator BearerAuthenticator->RequestAuthenticator

Conforms To

RequestAuthenticator

Help for creating authentication middleware based on Request.

Requirements

authenticate(bearer:​for:​)

func authenticate(bearer: BearerAuthorization, for request: Request) -> EventLoopFuture<Void>