mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-09-25 11:14:19 +00:00
The oidc-client integration tests read the real system clock through a `now()` helper. The ID token builder generates a fresh RSA key before stamping `iat`, while each test captured its own `now` earlier for verification. Under coverage instrumentation on a loaded CI runner, the two key generations in `fail_verify_id_token_wrong_auth_time` took more than the 5 minute `iat` leeway, so verification failed on `iat` before ever reaching the `auth_time` check the test asserts on. Make the helper return a frozen `MockClock` timestamp instead. Every token and verification in the binary now shares one instant, so setup duration can no longer affect the outcome, and the clippy opt-out for `Utc::now()` goes away.