Documentation
Polaris is a self-hosted authentication library: users, sessions, rotating refresh tokens, MFA, organizations and roles, in your database. It ships as two distributions with one behaviour.
| Distribution | Composer packages | Documentation |
|---|---|---|
| Polaris for Univeros | univeros/polaris 2.x, the Univeros module built on polaris/core | Polaris for Univeros: the specification, from the data model to the threat model, and the 2.0 decisions |
| Polaris for PHP | polaris/core, polaris/psr15, polaris/pdo, polaris/testing, polaris/cli, polaris/laravel, polaris/symfony, polaris/yii | Polaris for PHP: quick start, packages, framework adapters, CLI, endpoint specs |
Polaris for PHP was extracted from the 1.0 Univeros module with every response contract-frozen by recorded fixtures, and univeros/polaris 2.0 is that module rebuilt on polaris/core, so the specification describes both: the flows, MFA, organizations, API reference, security and events pages are what polaris/core implements. Class names in those pages (Univeros\Polaris\Entity\*, Cycle repositories) describe the 1.x shape; in 2.0 the same behaviour lives under the Polaris\ namespaces, and the upgrade guide lists what changes for a 1.x installation.
Where to start
Section titled “Where to start”- Univeros host: Polaris for Univeros, then Configuration; upgrading from 1.x, the upgrade guide.
- Laravel, Symfony, Yii or any PSR-15 host: Polaris for PHP, then Laravel, Symfony, Yii or PSR-15.
- Understanding the behaviour: Authentication flows, MFA and OTP, Organizations and RBAC, API reference.
- Reviewing the security posture: Security and threat model, Key rotation.
- Writing a framework adapter: The adapter contract.