Present single-use password setup handoff
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

This commit is contained in:
tegwick 2026-07-28 17:30:17 +02:00
parent bbe291dac3
commit 4efce34821
5 changed files with 45 additions and 0 deletions

View file

@ -187,6 +187,17 @@ class PortalApplicationTests(unittest.TestCase):
self.assertEqual("200 OK", page["status"])
self.assertIn(b"ada@example.test", html)
self.assertIn(b"Create login", html)
user_id = next(iter(self.app.service.store.users))
handoff, html = invoke(
self.app,
f"/admin/tenant:friendly:binky/users/{user_id}/provision",
method="POST",
cookie="ue_session=browser",
form={"csrf_token": "csrf-test-token"},
)
self.assertEqual("200 OK", handoff["status"])
self.assertIn(b"Continue to password setup", html)
self.assertIn(b"https://kc.example/setup/password?token=opaque", html)
class FakeProvisioning:
@ -199,6 +210,7 @@ class FakeProvisioning:
provider="netkingdom-lldap",
external_subject=request.primary_email.split("@")[0],
status="password_setup_required",
password_setup_url="https://kc.example/setup/password?token=opaque",
)
def suspend(self, *, external_subject, idempotency_key, correlation_id):