Topic: jwt
-
Building a Rust API with Rocket and JWT Authentication
When building backend APIs, JWT authentication is a common requirement. In Rust, you’ve got several web frameworks to choose from, and Rocket is one that makes request handling feel natural with its request guard system. Combining Rocket with JWTiny for JWT validation and JWKServe as a local identity provider gives you a complete setup for development and testing without external dependencies.
-
JWTiny: Minimal JWT Validation for Rust
I was learning Rust with an example project that needed JWT validation. The popular
jsonwebtokencrate depends onserde, but I wantedminiserdeinstead. That constraint led me to build my own validator — handling signature verification, claims validation, and remote key fetching, designed for reuse across requests. JWTiny is the result. -
JWKServe: A Fake JWT Authentication Service for Local Development
When writing backend services that validate JWT access tokens, you run into a frustrating problem: you need a real identity provider just to test your authentication logic. With Cognito, Auth0, or other OpenID Connect providers, spinning up an authentication service for local development or CI pipelines adds unnecessary complexity. You need valid signatures and correct claims, not the provider itself. That’s where JWKServe comes in.