Commit ec4c45b
committed
feat: reject already-expired sessions at login and generalize epoch claim extraction
Add a login-time lockout guard to complete_interactive_login: when the upstream
IdP asserts a session_expiry ceiling already in the past at login (compared
against the ID token iat with the same 30s leeway as read-time enforcement),
raise the new flow-agnostic SessionExpiredError instead of persisting an
already-expired session. A missing claim stays a no-op, preserving existing
behavior.
Generalize extract_session_expiry into extract_epoch_claim(claims, name),
reused for both session_expiry and iat, and rename the ceiling predicates to
is_session_ceiling_reached (read-time) and is_session_ceiling_in_past (login).
Document the login rejection in the README, RetrievingData guide, and the
ipsie-webapp example.1 parent aaad5b1 commit ec4c45b
6 files changed
Lines changed: 371 additions & 70 deletions
File tree
- examples
- src/auth0_server_python
- auth_server
- error
- tests
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
96 | 111 | | |
97 | 112 | | |
98 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
640 | 641 | | |
641 | 642 | | |
642 | 643 | | |
| 644 | + | |
| 645 | + | |
643 | 646 | | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
648 | | - | |
| 651 | + | |
| 652 | + | |
649 | 653 | | |
650 | 654 | | |
651 | 655 | | |
| |||
663 | 667 | | |
664 | 668 | | |
665 | 669 | | |
666 | | - | |
| 670 | + | |
| 671 | + | |
667 | 672 | | |
668 | 673 | | |
669 | 674 | | |
| |||
692 | 697 | | |
693 | 698 | | |
694 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
695 | 704 | | |
696 | 705 | | |
697 | 706 | | |
| |||
754 | 763 | | |
755 | 764 | | |
756 | 765 | | |
757 | | - | |
| 766 | + | |
758 | 767 | | |
759 | 768 | | |
760 | 769 | | |
| |||
1005 | 1014 | | |
1006 | 1015 | | |
1007 | 1016 | | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
| 1017 | + | |
1012 | 1018 | | |
1013 | | - | |
| 1019 | + | |
1014 | 1020 | | |
1015 | 1021 | | |
1016 | 1022 | | |
1017 | | - | |
1018 | | - | |
| 1023 | + | |
1019 | 1024 | | |
1020 | 1025 | | |
1021 | 1026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
214 | 227 | | |
215 | 228 | | |
216 | 229 | | |
| |||
0 commit comments