Implement verified public registration flow
This commit is contained in:
parent
b7a57a50a4
commit
c36a09bded
12 changed files with 610 additions and 7 deletions
|
|
@ -8,6 +8,7 @@ from wsgiref.simple_server import make_server
|
|||
from user_engine.adapters import (
|
||||
FlexAuthHTTPAdapter,
|
||||
HTTPOutboxDeliveryAdapter,
|
||||
HTTPRegistrationVerificationAdapter,
|
||||
PostgresUserEngineStore,
|
||||
VerifiedIdentityClaimsAdapter,
|
||||
HTTPIdentityProvisioningAdapter,
|
||||
|
|
@ -74,6 +75,33 @@ def create_application() -> PortalApplication:
|
|||
),
|
||||
tenant_management=tenant_management,
|
||||
outbox_delivery=outbox_delivery,
|
||||
registration_verification=(
|
||||
HTTPRegistrationVerificationAdapter(
|
||||
base_url=_required("USER_ENGINE_REGISTRATION_VERIFICATION_URL"),
|
||||
bearer_token=_required("USER_ENGINE_REGISTRATION_VERIFICATION_TOKEN"),
|
||||
)
|
||||
if os.environ.get("USER_ENGINE_PUBLIC_REGISTRATION", "false").lower()
|
||||
== "true"
|
||||
else None
|
||||
),
|
||||
registration_clients=tuple(
|
||||
item.strip()
|
||||
for item in os.environ.get("USER_ENGINE_REGISTRATION_CLIENTS", "").split(",")
|
||||
if item.strip()
|
||||
),
|
||||
registration_tenants=tuple(
|
||||
item.strip()
|
||||
for item in os.environ.get("USER_ENGINE_REGISTRATION_TENANTS", "").split(",")
|
||||
if item.strip()
|
||||
),
|
||||
registration_oidc_issuer=_required("USER_ENGINE_OIDC_ISSUER"),
|
||||
registration_password_setup_origins=tuple(
|
||||
item.strip().rstrip("/")
|
||||
for item in os.environ.get(
|
||||
"USER_ENGINE_REGISTRATION_PASSWORD_SETUP_ORIGINS", ""
|
||||
).split(",")
|
||||
if item.strip()
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue