Present single-use password setup handoff
This commit is contained in:
parent
bbe291dac3
commit
4efce34821
5 changed files with 45 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue