postrust-auth 0.4.0

JWT authentication and role resolution for Postrust
Documentation

postrust-auth

JWT authentication and role resolution for Postrust.

  • Verifies JWTs (plain or base64 secrets) and extracts claims.
  • Resolves the PostgreSQL role for a request, falling back to the anonymous role.
  • Passes claims through as GUCs so row-level security policies can read them.

Install

cargo add postrust-auth

Part of Postrust

Postrust turns a PostgreSQL database into a REST and GraphQL API. It is published as a set of crates so you can depend on only the part you need:

Crate Role Docs
postrust-server HTTP server docs.rs
postrust-core Engine docs.rs
postrust-sql SQL builder docs.rs
postrust-auth (this crate) Authentication docs.rs
postrust-response Response formatting docs.rs
postrust-graphql GraphQL docs.rs
postrust-lambda AWS Lambda docs.rs
postrust-worker Cloudflare Workers docs.rs
postrust-proxy Reverse proxy docs.rs

Links

License

MIT -- see LICENSE.