Skip to main content

Module consumers

Module consumers 

Source
Expand description

Consumer identities and credentials.

The featherbit analogue of APISIX’s consumer concept: named API clients declared in gateway.yaml (or via the Admin API), each carrying per-auth-plugin credentials. Auth plugins configured with use_consumers: true resolve the presented credential against the ConsumerStore and, on a match, attach the consumer’s identity to the request via attach_consumer so downstream nodes (consumer-restriction, loggers, rate limits keyed on $consumer_name) can act on it.

The store is immutable once built; reloads build a fresh store and swap it atomically (ArcSwap in PluginResources), so lookups on the request path are lock-free.

Structs§

Consumer
A resolved consumer, shared read-only across requests.
ConsumerConfig
A consumer as declared in gateway.yaml under consumers:.
ConsumerStore
Lock-free lookup structure over the declared consumers.

Functions§

attach_consumer
Attaches a matched consumer’s identity to the request.
primary_credential_field 🔒
The credential field indexed per auth type.