Authentication
Secure your API with industry-standard auth mechanisms.
Stoma’s power comes from its extensive library of built-in policies. Policies are named, prioritized Hono middleware handlers that you can compose into pipelines to handle every aspect of your API’s behavior.
Browse policies by category to find the right building blocks for your gateway.
Authentication
Secure your API with industry-standard auth mechanisms.
Traffic Control
Manage and protect your API traffic at scale.
Resilience
Ensure your API stays healthy even when upstreams fail.
Transformation
Modify requests and responses on the fly.
Observability
Monitor your gateway’s performance and health.
Custom Policies
Extend Stoma with your own logic using the Policy SDK.
Policies in a pipeline execute based on a numeric priority (lowest number first). This ensures that critical tasks like logging and authentication always happen before downstream transforms or proxying.
| Priority | Category | Examples |
|---|---|---|
| 0 | Observability | requestLog |
| 10 | Authentication | jwtAuth, apiKeyAuth |
| 20 | Rate Limiting | rateLimit |
| 40 | Caching | cache |
| 95 | Proxy | proxy |