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

daycry / auth / 25545552027
72%

Build:
DEFAULT BRANCH: development
Ran 08 May 2026 08:33AM UTC
Jobs 1
Files 184
Run time 1min
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

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)

128 of 182 new or added lines in 10 files covered. (70.33%)

3672 of 6219 relevant lines covered (59.04%)

48.17 hits per line

Uncovered Changes

Lines Coverage ∆ File
22
0.0
0.0% src/Controllers/UserSecurityController.php
13
0.0
src/Filters/GateFilter.php
9
84.21
src/Authorization/Gate.php
4
92.0
-1.24% src/Traits/Authorizable.php
2
91.67
9.17% src/Authentication/Authenticators/Base.php
2
50.0
src/Authorization/AuthorizationException.php
2
95.35
src/Filters/BasicAuthFilter.php
Jobs
ID Job ID Ran Files Coverage
1 25545552027.1 08 May 2026 08:33AM UTC 184
59.04
GitHub Action Run
Source Files on build 25545552027
  • Tree
  • List 184
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25545552027
  • 37bb5b33 on github
  • Prev Build on development (#25517034610)
  • Next Build on development (#25545938245)
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