test(auth): pin the bunyip userinfo email_verified contract (PMS-248) #179
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/mapps-248-userinfo-email-verified-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
PMS-248: verify the PMS-244 invite gate's dependency - bunyip's
/oauth2/userinfomust reportemail_verified- and pin it.Finding (verified, no fix needed)
bunyip-api's userinfo handler (
crates/bunyip-oidc/src/handlers/oidc.rs) emitsemail_verifiedstraight from theusers.email_verifiedcolumn. That column isNOT NULL DEFAULT FALSEand setTRUEon email verification (magic-link / password-reset / verify paths viaset_email_verified). So a real verified Bunyip login carriesemail_verified=trueto mokosh, and the PMS-244 invite gate (email_verified == true) works as designed. An unverified account correctly does NOT get invites applied.Change
Documentation + a regression guard on the consuming side - no behavior change:
UserInfo.email_verifiedrecording the verified Bunyip contract.userinfo_email_verified_contracttest: verified payload ->Some(true), unverified ->Some(false), omitted field ->None(the gate fails closed, never erroring the request).Verification
cargo test --lib oidc_rs::tests::userinfo_email_verified_contractpasses;cargo clippy --libclean.🤖 Generated with Claude Code