axum-impl-auth-jwt

Official

Secure JWT auth with type-safe Axum extractors

AuthorImpertio-Studio
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It eliminates insecure or incorrect JWT authentication patterns in Axum services by ensuring stateless bearer-token verification is implemented correctly and consistently.

Core Features & Use Cases

  • Type-enforced route protection: Implements Claims as a FromRequestParts extractor so any handler that takes claims: Claims is automatically protected.
  • Correct JWT validation behavior: Requires an exp claim and uses Validation::default() so expired or missing-exp tokens are rejected reliably.
  • Safe error handling: Centralizes failures in an AuthError enum that implements IntoResponse, preventing raw jsonwebtoken error leakage to clients.
  • Version-aware Axum guidance: Handles the Axum 0.7 vs 0.8 differences (notably #[async_trait] usage and typed-header imports).

Quick Start

Ask the AI to implement Axum JWT authentication for your login route and protect a /protected handler using Claims so that Axum 0.8 compiles and returns clean 401/400 responses for invalid tokens.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: axum-impl-auth-jwt
Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-auth-jwt

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.