Commit d761d67
committed
Lock JWT-claims call shape and document
Add `TestGetEntryClaims_PassesJWTClaimsToService` so the JWT-bearing
call shape (four mock matchers: ctx + entryType + name + jwtClaims) is
covered. The existing table test uses three matchers and would silently
break if the handler started passing a third option; the new case
locks the contract in place.
Also expand the `getEntryClaims` godoc to call out the authorization
model explicitly: role gate in middleware, JWT-subset check in the
service layer (mirrors the matching PUT), and the anonymous-mode
short-circuit. Note that the nil-claims-to-{} normalisation is dead
code in authz mode (publish forbids empty claims per auth.md §6 and
the gate denies them per §4) — so future readers don't assume it's
load-bearing for the authz path.GetEntryClaims posture1 parent fdb4793 commit d761d67
2 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
196 | 210 | | |
197 | 211 | | |
198 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
632 | 665 | | |
633 | 666 | | |
634 | 667 | | |
| |||
0 commit comments