ronnythedev/dotnet-clean-architecture-skills/12-dotnet-jwt-authentication
Claude Code and agent skill by ronnythedev/dotnet-clean-architecture-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Configures JWT Bearer authentication for .NET APIs. Includes token generation, validation, refresh tokens, and user context extraction from claims.
Install
npx vskill@latest install ronnythedev/dotnet-clean-architecture-skills/12-dotnet-jwt-authenticationSKILL.md
JWT Authentication Setup
Overview
This skill implements JWT (JSON Web Token) authentication for .NET APIs:
- Access Token - Short-lived JWT returned in response body
- Refresh Token - Stored in HttpOnly cookie (secure, not accessible via JavaScript)
- Options Pattern - Configurable expiration via JwtOptions
- Token Rotation - New refresh token issued on each refresh
- Security Audit - Comprehensive event tracking for compliance
- Token generation - Create access and refresh tokens
- Token validation - Validate incoming tokens
- User context - Extract user info from claims
Quick Reference
| Component | Purpose | Location | |
|---|---|---|---|
IJwtService | Token generation interface | Application/Abstractions | |
JwtService | Token generation implementation | Infrastructure/Authentication | |
JwtOptions | configuration (expiration, issuer, etc.) | Infrastructure/Authentication | |
JwtBearerOptionsSetup | Configure JWT validation | Infrastructure/Authentication | |
IUserContext | Current user info | Application/Abstractions | |
UserContext | Extract from HttpContext | Infrastructure/Authentication | |
IRefreshTokenRepository | Refresh token storage | Domain/Identity | |
CookieSettings | Cookie configuration | Infrastructure/Authentication |
Authentication Structure
Template: JWT Configuration Options
appsettings.json
Template: JWT Service Interface
Template: Token Response
Template: JWT Service Implementation
Template: Refresh Token Cookie Manager
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/12-dotnet-jwt-authentication/SKILL.md
Popularity
- Repository stars
- 64
- Repository forks
- 11
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ronnythedev/dotnet-clean-architecture-skills/12-dotnet-jwt-authentication)