spring-boot-security-jwt

spring-boot-security-jwt is a skill for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 66 tokens per session (3,349 once invoked), scanned A, original, MIT.

A set of authentication and access-control patterns for Spring Boot using JWTs, signed tokens that carry a user's identity and permissions. It covers bearer tokens, cookies, refresh and revocation flows, OAuth2 integration, and role- or permission-based rules.

In plain words
What is it for?
Use it to add login token creation and validation, refresh tokens, logout or token revocation, OAuth2 connections, and method-level authorization.
Why use it?
It helps secure REST APIs and control which users or roles can perform particular actions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the developer-kit-java plugin — 52 skills, 11 commands, 9 agents shipped together

Good fit Use it to add login token creation and validation, refresh tokens, logout or token revocation, OAuth2 connections, and method-level authorization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add giuseppe-trisciuoglio/developer-kit --skill spring-boot-security-jwt
Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit

Made for: Claude Code.

Or install developer-kit-java, the plugin that ships this one along with the rest of its 52 skills, 11 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spring-boot-security-jwt

README.md
[![agentmods](https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt/github.svg)](https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt)
Your own site
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spring-boot-security-jwt

Your own site · 80×15
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-security-jwt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 15 Sept 2026
  • Snyk pass 15 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.03349
Opus 5.5 $0.00026 $0.01340
Sonnet 5.5 $0.00013 $0.00670
Haiku 4.5 $0.00007 $0.00335

Measured 1mo ago against content hash b60091ba42fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spring-boot-security-jwt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/generate-jwt-keys.sh, scripts/test-jwt-setup.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/developer-kit-java/skills/spring-boot-security-jwt/SKILL.md · 361 lines

How it starts

The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spring Boot JWT Security

JWT authentication and authorization patterns for Spring Boot 3.5.x using Spring Security 6.x and JJWT. Covers token generation, validation, refresh strategies, RBAC/ABAC, and OAuth2 integration.

Overview

This skill provides implementation patterns for stateless JWT authentication in Spring Boot applications. It covers the complete authentication flow including token generation with JJWT 0.12.6, Bearer/cookie-based authentication, refresh token rotation, and method-level authorization with @PreAuthorize expressions.

Key capabilities:

  • Access and refresh token generation with configurable expiration
  • Bearer token and HttpOnly cookie authentication strategies
  • Integration with Spring Data JPA and OAuth2 providers
  • RBAC with role/permission-based @PreAuthorize rules
  • Token revocation and blacklisting for logout/rotation

When to Use

Activate when user requests involve:

  • "Implement JWT authentication", "secure REST API with tokens"
  • "Spring Security 6.x configuration", "SecurityFilterChain setup"
  • "Role-based access control", "RBAC", `@PreAuthorize`
  • "Refresh token", "token rotation", "token revocation"
  • "OAuth2 integration", "social login", "Google/GitHub auth"
  • "Stateless authentication", "SPA backend security"
  • "JWT filter", "OncePerRequestFilter", "Bearer token"
  • "Cookie-based JWT", "HttpOnly cookie"
  • "Permission-based access control", "custom PermissionEvaluator"

Quick Reference

Dependencies (JJWT 0.12.6)

Artifact Scope
spring-boot-starter-security compile
spring-boot-starter-oauth2-resource-server compile
io.jsonwebtoken:jjwt-api:0.12.6 compile
io.jsonwebtoken:jjwt-impl:0.12.6 runtime
io.jsonwebtoken:jjwt-jackson:0.12.6 runtime
spring-security-test test

See references/jwt-quick-reference.md for Maven and Gradle snippets.

Key Configuration Properties

Property Example Value Notes
jwt.secret ${JWT_SECRET} Min 256 bits, never hardcode
jwt.access-token-expiration 900000 15 min in milliseconds
jwt.refresh-token-expiration 604800000 7 days in milliseconds
jwt.issuer my-app Validated on every token
jwt.cookie-name jwt-token For cookie-based auth
jwt.cookie-http-only true Always true in production
jwt.cookie-secure true Always true with HTTPS

Read the full file on GitHub · 361 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 361 lines · 66 tokens per session scan A b60091ba42fb

Subscribe to this mod's changes

spring-boot-security-jwt is a skill published in the GitHub repository giuseppe-trisciuoglio/developer-kit (360 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 3,349 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.