mcpField
S
spring-security

spring-security

github.com/full-stack-skills安全3192 次安装4 周前更新
代码仓库

关于 spring-security

面向 Spring Security 开发者的技能指南,涵盖认证、授权与常见安全机制配置,并提供安全实践要点。

主要功能

  1. 01配置 SecurityFilterChain 与用户服务
  2. 02处理登录、登出和异常
  3. 03集成 JWT 与 OAuth2
  4. 04配置方法安全、CSRF 和 CORS
  5. 05密码、会话与 Cookie 安全建议

适用场景

  1. 01为 Spring 应用配置认证与授权
  2. 02接入 OAuth2 客户端或资源服务器
  3. 03设置方法级权限与 CSRF 防护

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/full-stack-skills/spring-skills --skill spring-security

安装后在 Claude Code 中输入/spring-security确认已加载。

附带文件agents/openai.yamlLICENSE.txt

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

When to use this skill

Use this skill whenever the user wants to:

  • 用 Spring Security 配置认证、授权、会话与安全头
  • 集成 OAuth2、JWT、方法安全与 CSRF

How to use this skill

  1. 配置:SecurityFilterChain、UserDetailsService、PasswordEncoder;登录/登出与异常处理。
  2. 进阶:JWT、OAuth2 客户端/资源服务器;@PreAuthorize、CORS。
  3. 参考:https://docs.spring.io/spring-security/reference/

Best Practices

  • 密码加密、会话与 Cookie 安全;最小权限与角色设计。
  • 生产用 HTTPS 与安全头;敏感路径保护。

Keywords

spring security, 认证, 授权, JWT, OAuth2

评论

支持 Markdown