• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daycry / auth / 25545552027 / 1
72%
development: 72%

Build:
DEFAULT BRANCH: development
Ran 08 May 2026 08:33AM UTC
Files 184
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 May 2026 08:28AM UTC coverage: 59.045% (+0.4%) from 58.608%
25545552027.1

push

github

daycry
Add Laravel-parity auth features: Gates, Password Confirmation, Basic auth

Three independent additions that close the gaps identified when
comparing daycry/auth against Laravel Fortify + Sanctum + core. All
three are aditive — no existing API changes, no migrations needed.

F1. Gates & Policies (src/Authorization/)
- New `Gate` service (registered as `service('gate')`) with closure-
  and class-based authorization rules.
  - `define('post.update', fn($user, $post) => …)` for inline rules.
  - `policy(Post::class, PostPolicy::class)` for class-based policies.
  - `allows() / denies() / authorize() / forUser() / has()`.
  - Auto-discovery: `App\Models\Post` → `App\Policies\PostPolicy`,
    namespace configurable via `Auth::$policyNamespace` (default
    `App\Policies\`); toggle via `Auth::$gateAutoDiscover`.
  - Ability names like `post.update` resolve to method `update()` on
    the policy; bare names work too.
- Abstract `Policy` base with optional `before()` hook for global
  short-circuits (e.g. admins bypass everything on a resource).
- `PolicyResponse::allow($msg)` / `::deny($msg)` to carry deny-reason
  text; `->authorize()` throws `AuthorizationException` on deny.
- Brand-new `Daycry\Auth\Authorization\AuthorizationException`
  (distinct from the pre-existing `Exceptions\AuthorizationException`
  used by RBAC errors); carries the PolicyResponse.
- New `gate:ability,…` filter alias for ability-only route guards.
  Use the Gate API directly inside controllers when the check needs a
  resource argument.
- `Authorizable` trait gains `canDo()` / `cantDo()` — sister methods
  to the existing `can()` / `cant()`. The originals still take
  permission strings only ("posts.update"), the new ones route
  through the Gate and accept resource arguments. Signature of
  `can()` is unchanged.

F2. Password Confirmation workflow ("sudo mode")
- New `password-confirm` filter alias backed by `PasswordConfirmFilter`.
  Reads `password_confirmed_at` from the sessio... (continued)

3672 of 6219 relevant lines covered (59.04%)

48.17 hits per line

Source Files on job 25545552027.1
  • Tree
  • List 184
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25545552027
  • 37bb5b33 on github
  • Prev Job for on development (#25517034610.1)
  • Next Job for on development (#25545938245.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc