Repository navigation
Commit bd3b749
authored
Give the authentication source Source and Destination before login (#86)
An authentication source that reports failed logins, for example in
F-ticks, reads $state['Source']['entityid'] and
$state['Destination']['entityid']. casserver set them only after login,
for the authproc filters, so a failed CAS login named neither entity.
handleAuthenticate() now passes both to Auth\Simple::login(), with the
values the filters see after a successful login: Source comes from
resolveIdpEntityId(), now shared with runAuthProcs(), and Destination is
the requesting service, left out when the request names none. This covers
interactive, renewed and passive logins.
A session keeps neither key, so login()'s check that a resumed state
belongs to the requested service does not bind a session to its first
service. The tests pin both the equal values and that.
Assisted-by: Claude Code (claude-opus-5-5, implementation & unit tests)
Assisted-by: Google Antigravity (gemini-3.8-flash-high, review)1 parent c1dd40a commit bd3b749
5 files changed
Lines changed: 263 additions & 6 deletions
File tree
- config
- docs
- src
- Cas
- Controller
- tests/src/Controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
523 | 524 | | |
524 | 525 | | |
525 | 526 | | |
| 527 | + | |
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| 535 | + | |
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
| 542 | + | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| |||
570 | 574 | | |
571 | 575 | | |
572 | 576 | | |
| 577 | + | |
573 | 578 | | |
574 | 579 | | |
575 | 580 | | |
| |||
581 | 586 | | |
582 | 587 | | |
583 | 588 | | |
| 589 | + | |
584 | 590 | | |
585 | 591 | | |
586 | 592 | | |
| |||
589 | 595 | | |
590 | 596 | | |
591 | 597 | | |
| 598 | + | |
592 | 599 | | |
593 | 600 | | |
594 | 601 | | |
595 | 602 | | |
596 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
597 | 608 | | |
598 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
599 | 614 | | |
600 | 615 | | |
601 | 616 | | |
| |||
0 commit comments