class

Pika::Auth::Strategy

Inherits Reference < Object

Abstract base class for all authentication strategies. Subclasses implement authenticate! which raises Pika::UnauthorizedError on failure.

Instance methods

authenticate!(env : HTTP::Server::Context) : Nil

Authenticate the request. Raises Pika::UnauthorizedError if auth fails.

Source
credentials(env : HTTP::Server::Context) : String | Nil

Extract the credential from the request (token, key, decoded basic string, etc.). Returns nil if the credential is absent.

Source