Repository navigation
Commit af7979e
test(auth): read the clock once in NIP-FI until test (#8457)
🤖 The exact NIP-FI assertion-lifetime boundary test could fail when its
JWT helper read the clock, then ES256 signing crossed a whole-second
boundary. The token's `until` claim could land one second beyond the
verifier's `now + skew + maximum_age` ceiling even though both were
intended to use the same test instant.
This changes the test helper to accept a captured instant and uses that
instant for both the JWT time claims and `verify_at`. The boundary
remains strict: `now + 3630s` is accepted and `now + 3631s` is rejected.
No production code changes.
Signed-off-by: Will Pfleger <[email protected]>
Signed-off-by: Alia <d32955ad69077062930cc46cfe2df30ca9aaf6f8e76422681265e9e9af704d78@buzz.block.builderlab.xyz>
Co-authored-by: Alia <d32955ad69077062930cc46cfe2df30ca9aaf6f8e76422681265e9e9af704d78@buzz.block.builderlab.xyz>1 parent dc4cdc4 commit af7979e
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
952 | 962 | | |
953 | 963 | | |
954 | 964 | | |
| |||
1225 | 1235 | | |
1226 | 1236 | | |
1227 | 1237 | | |
1228 | | - | |
| 1238 | + | |
1229 | 1239 | | |
1230 | 1240 | | |
1231 | 1241 | | |
1232 | 1242 | | |
1233 | 1243 | | |
1234 | 1244 | | |
1235 | | - | |
| 1245 | + | |
1236 | 1246 | | |
1237 | 1247 | | |
1238 | 1248 | | |
| |||
0 commit comments