Download the PHP package nawasara/auth-primitives without Composer
On this page you can find all versions of the php package nawasara/auth-primitives. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nawasara/auth-primitives
More information about nawasara/auth-primitives
Files in nawasara/auth-primitives
Package auth-primitives
Short Description Low-level auth primitives for Nawasara packages: sudo mode (session window, Livewire attribute, route middleware), built to live below the application shell so domain packages can depend on it without dragging in core.
License MIT
Informations about the package auth-primitives
nawasara/auth-primitives
Low-level auth primitives for Nawasara
packages. Lives below the application shell (nawasara/core) so any
domain package can depend on it without pulling in the rest of Nawasara.
What's in the box
| Primitive | Purpose |
|---|---|
Nawasara\AuthPrimitives\Auth\Sudo |
Session window — single source of truth for "has the user recently re-authenticated?" |
Nawasara\AuthPrimitives\Http\Middleware\EnsureSudo |
Route gate, registered as the sudo middleware alias |
#[Nawasara\AuthPrimitives\Attributes\RequiresSudo] |
Livewire method attribute — gates one action behind sudo |
Nawasara\AuthPrimitives\Traits\WithSudo |
Livewire component trait — handles the step-up redirect |
Nawasara\AuthPrimitives\Exceptions\SudoRequiredException |
Renderable exception (403 or redirect) |
sudo_active(), sudo_remaining_seconds() |
Blade helpers |
What's NOT in here
The OTP step-up itself (IdP redirect, callback, ID-token verification) is
not in this package. It lives in nawasara/core's SudoController,
which calls Sudo::confirm($userId) on a verified step-up. This split
lets domain packages enforce a sudo window without depending on the
integration plumbing.
Usage
Route-level
The sudo alias is registered automatically by
AuthPrimitivesServiceProvider.
Livewire action-level
Blade display
Config
Defaults are bundled. Publish to override:
License
MIT.