jwt-authentication

Configure JWT Bearer authentication for .NET APIs with token issuance and validation.

69|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill jwt-authentication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jwt-authentication
Source: https://github.com/ronnythedev/dotnet-clean-architecture-skills/tree/main/sample/POS/.claude/skills/12-jwt-authentication
Command: npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill jwt-authentication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.AspNetCore.Authentication.JwtBearer, System.IdentityModel.Tokens.Jwt.

What problem does it solve?

Establishes JWT Bearer authentication for .NET APIs to issue and verify access tokens.

Core Features & Use Cases

  • Token generation and validation for API endpoints.
  • Refresh token rotation with secure HttpOnly cookies.
  • User context extraction from claims for authorization decisions.
  • Suitable for enterprise-grade APIs needing scalable, stateless auth with robust auditing.

Quick Start

Configure JwtOptions in appsettings, register the Jwt services, and issue tokens via a login flow to authenticate API requests.

Frequently Asked Questions about jwt-authentication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT Bearer authentication in a .NET API?

JWT Bearer authentication in a .NET API is established by configuring JwtOptions in appsettings, registering Jwt services, and issuing tokens via a login flow to authenticate requests.

How does refresh token rotation work with secure HttpOnly cookies in .NET?

Refresh token rotation with secure HttpOnly cookies in .NET works by issuing new access tokens upon validating the refresh token stored in the cookie, ensuring scalable, stateless auth.

Can I use JwtBearer to extract user context from claims for authorization?

Yes, you can use JwtBearer to extract user context from claims for authorization decisions. The integration applies user context extraction across API layers for enterprise-grade APIs.

Do I need System.IdentityModel.Tokens.Jwt to issue and verify access tokens?

Yes, you need System.IdentityModel.Tokens.Jwt along with Microsoft.AspNetCore.Authentication.JwtBearer to issue and verify access tokens for API endpoints in your .NET application.

What is the best way to establish stateless auth with JWT for enterprise-grade .NET APIs?

The best way to establish stateless auth with JWT for enterprise-grade .NET APIs is by configuring JwtBearerOptionsSetup, JwtService, and JwtOptions to issue, verify, and rotate access tokens.

Related Skills