cosmicstack-labs/authentication-authorization
JWT, OAuth2, SAML, session management, RBAC, ABAC, and MFA implementation
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill authentication-authorization
Implement secure auth in your applications.
| 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) |
{
"roles": ["admin", "editor", "viewer"],
"permissions": {
"admin": ["read:*", "write:*", "delete:*"],
"editor": ["read:*", "write:*"],
"viewer": ["read:*"]
}
}
Policy engine evaluates: user attributes + resource attributes + environment
*"Allow access if user.department == resource.department AND user.clearance >= resource.classification"*
Take cosmicstack-labs/authentication-authorization from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.