Authentication
Polysystems supports two authentication methods: JWT session tokens for browser-based access and API tokens for programmatic access. Both use the Authorization: Bearer header.
JWT Session Tokens
When you sign in through the web interface, the server issues a JWT stored in localStorage. Tokens expire after 7 days.
| Field | Value |
|---|---|
| Algorithm | HS256 |
| Expiry | 7 days |
| Claims | sub (user UUID), email, iat, exp |
| Storage | localStorage (access_token) |
Token Structure
API Tokens
API tokens provide programmatic access without a browser session. Ideal for CI/CD pipelines, MCP servers, and CLI tools.
Token Scopes
| Scope | Access |
|---|---|
| secrets:read | Read vault contents and list secrets |
| secrets:write | Create, update, and delete secrets |
| mcp:access | Access secrets via MCP protocol |
| admin | Full account access including token management |
OAuth Providers
GitHub and Google are supported. On first login, a user record is created automatically.
1
2
3
4