Back to skills
SKILL.md
Jwt Verify
ASecurityImplement JWT verification middleware in FastAPI for user auth. Use when securing APIs or handling tokens.
- 666 stars
- 0 votes
- 0 copies
- 2 views
- Added February 9, 2026
Works with
Security analysis
100/100npx -y skills add majiayu000/claude-skill-registry --skill jwt-verify --agent claude-codeAre you the author of Jwt Verify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-jwt-verify)---
name: jwt-verify
description: Implement JWT verification middleware in FastAPI for user auth. Use when securing APIs or handling tokens.
---
# JWTVerify Instructions
Input: Request with Authorization header, shared secret.
Output: Verified user claims or 401 error.
Steps:
1. Install dependencies if needed (jose, fastapi-security).
2. Generate middleware code.
Example Code:
from fastapi import Depends, HTTPException
from jose import JWTError, jwt
from fastapi.security import HTTPBearer
security = HTTPBearer()
async def verify_jwt(token: str = Depends(security)):
try:
payload = jwt.decode(token.credentials, SECRET_KEY, algorithms=["HS256"])
return payload
except JWTError:
raise HTTPException(401, "Invalid token")Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.