Skip to main content

auth-and-authorization-patterns

Use this skill when implementing authentication (login, token issuance) or authorization (access control, permissions). Apply whenever the task involves login flows, JWT, OAuth2, session management, or RBAC.

Informações da origem

Repositório
aiming-lab/MetaClaw
Última atividade na origem
10 de março de 2026 às 18:04
Idioma detectado do SKILL.md
inglês
Estrelas
3.464
Forks
452

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
auth-and-authorization-patterns
description
Use this skill when implementing authentication (login, token issuance) or authorization (access control, permissions). Apply whenever the task involves login flows, JWT, OAuth2, session management, or RBAC.
category
security
# Auth & Authorization Patterns **Authentication (who are you?):** - Use a battle-tested library — do not roll your own crypto. - Hash passwords with bcrypt/argon2; never MD5/SHA1 for passwords. - Use short-lived JWTs (15–60 min) with refresh tokens; store refresh tokens securely. - Implement MFA for sensitive operations. **Authorization (what can you do?):** - Check authorization on every request, not just at login. - Enforce RBAC or ABAC at the service layer, not the UI. - Apply principle of least privilege: grant minimal permissions needed. **OAuth2 / OIDC:** - Use the Authorization Code flow with PKCE for user-facing apps. - Validate `iss`, `aud`, `exp`, and `nonce` claims on every token. **Session management:** - Regenerate session ID after login (session fixation prevention). - Set `HttpOnly` and `Secure` flags on session cookies.
Ver no GitHub