Pika::Auth::Strategies::ApiKey
Inherits Pika::Auth::Strategy < Reference < Object
API key authentication. Reads the key from a request header and/or a query parameter. If both are configured, the header is checked first. The validator block receives the raw key string and must return true to allow the request.
Constructors
Instance methods
Authenticate the request. Raises Pika::UnauthorizedError if auth fails.
Extract the credential from the request (token, key, decoded basic string, etc.). Returns nil if the credential is absent.