Authentication Authorization
JWT, OAuth2, SAML, session management, RBAC, ABAC, and MFA implementation
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill authentication-authorizationgit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/backend/authentication-authorization ~/.claude/skills/authentication-authorizationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Authentication & Authorization
Implement secure auth in your applications.
## Authentication Methods
| Method | Use Case | Security Level |
|--------|----------|---------------|
| Session/Cookie | Server-rendered apps | High (HTTP-only, secure flags) |
| JWT | APIs, SPAs | Medium (stateless, revocable with blacklist) |
| OAuth2 | Third-party login | High (delegate to providers) |
| SAML | Enterprise SSO | High (enterprise identity) |
| WebAuthn | Passwordless | Very high (biometric, hardware keys) |
### JWT Best Practices
- Short expiry (15 min access, 7 day refresh)
- Store refresh tokens in HTTP-only cookies (not localStorage)
- Use RS256 (asymmetric) not HS256 in microservices
- Include minimal claims (sub, exp, iat, scope)
- Always validate signature + expiry + audience
## Authorization Models
### RBAC (Role-Based)
```json
{
"roles": ["admin", "editor", "viewer"],
"permissions": {
"admin": ["read:*", "write:*", "delete:*"],
"editor": ["read:*", "write:*"],
"viewer": ["read:*"]
}
}
```
### ABAC (Attribute-Based)
Policy engine evaluates: user attributes + resource attributes + environment
*"Allow access if user.department == resource.department AND user.clearance >= resource.classification"*
## MFA Implementation
- TOTP (Google Authenticator) — standard
- SMS — least secure, avoid if possible
- Push notification — good UX
- Hardware keys (WebAuthn) — most secure
### Enforcement
- Require MFA for admin actions
- Require MFA on new device loginDetails
- Skill name
authentication-authorization- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/backend/authentication-authorization/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Authentication Authorization skill do?
JWT, OAuth2, SAML, session management, RBAC, ABAC, and MFA implementation
How do I install the Authentication Authorization skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill authentication-authorization. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Authentication Authorization popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Caching Strategies
492cosmicstack-labs/mercury-agent-skills
CDN, Redis, in-memory cache, cache invalidation, and distributed caching patterns
Architecture Decision Records
492cosmicstack-labs/mercury-agent-skills
ADR methodology, templates, decision capture workflows, and architectural governance patterns
Clean Code
492cosmicstack-labs/mercury-agent-skills
Principles and practices for writing readable, maintainable, and testable code
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.