auth-implementation-patterns
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.
DeepseekModel
官方收录技能
质量 优秀 · 90
v1.0.0
获取
https://deepseekmodel.com/api/download.php?id=wshobson-agents-plugins-developer-essentials-skills-auth-implementation-patterns-skill-md&format=skill
下载 .skill
标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name auth-implementation-patterns description Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues. Authentication & Authorization Implementation Patterns Build secure, scalable authentication and authorization systems using industry-standard patterns and modern best practices. When to Use This Skill Implementing user authentication systems Securing REST or GraphQL APIs Adding OAuth2/social login Implementing role-based access control (RBAC) Designing session management Migrating authentication systems Debugging auth issues Implementing SSO or multi-tenancy Core Concepts 1. Authentication vs Authorization Authentication (AuthN) : Who are you? Verifying identity (username/password, OAuth, biometrics) Issuing credentials (sessions, tokens) Managing login/logout Authorization (AuthZ) : What can you do? Permission checking Role-based access control (RBAC) Resource ownership validation Policy enforcement 2. Authentication Strategies Session-Based: Server stores session state Session ID in cookie Traditional, simple, stateful Token-Based (JWT): Stateless, self-contained Scales horizontally Can store claims OAuth2/OpenID Connect: Delegate authentication Social login (Google, GitHub) Enterprise SSO Detailed patterns and worked examples Detailed pattern documentation lives in references/details.md . Read that file when the navigation tier above is insufficient. Best Practices Never Store Plain Passwords : Always hash with bcrypt/argon2 Use HTTPS : Encrypt data in transit Short-Lived Access Tokens : 15-30 minutes max Secure Cookies : httpOnly, secure, sameSite flags Validate All Input : Email format, password strength Rate Limit Auth Endpoints : Prevent brute force attacks Implement CSRF Protection : For session-based auth Rotate Secrets Regularly : JWT secrets, session secrets Log Security Events : Login attempts, failed auth Use MFA When Possible : Extra security layer Common Pitfalls Weak Passwords : Enforce strong password policies JWT in localStorage : Vulnerable to XSS, use httpOnly cookies No Token Expiration : Tokens should expire Client-Side Auth Checks Only : Always validate server-side Insecure Password Reset : Use secure tokens with expiration No Rate Limiting : Vulnerable to brute force Trusting Client Data : Always validate on server
Agent 识别该技能的关键词,点击任意一个即可复制。
该技能未提供触发词。
下载的 .skill 包内含以下字段。
| 字段 | 说明 |
|---|---|
| format | 格式标识(skill/v1) |
| skill_id | 技能唯一 ID |
| name | 技能名称 |
| version | 版本号 |
| description | 技能描述 |
| category | 所属分类(数组) |
| trigger_words | 触发词列表 |
| tags | 标签列表 |
| source | 来源标识 |
| source_url | 来源链接(本页地址) |
| exported_at | 导出时间(每次下载生成) |
| system_prompt | 系统提示词正文 |
| model_config | 模型参数:provider / model / temperature / max_tokens / top_p |
| examples | 示例 |
| install_guide | 各平台导入说明(Coze / Dify / Claude / 自定义框架) |