mirror of
https://github.com/zulip/zulip.git
synced 2026-06-03 21:01:43 +08:00
Add a "custom_profile_field_map" option to SCIM_CONFIG that maps SCIM attribute names to Zulip custom profile field var names. When configured, custom profile field values are synced on user creation (POST), update (PUT), and partial update (PATCH), and included in GET responses. Var names are derived from the custom profile field name by lowercasing and replacing spaces with underscores (matching the convention in sync_user_profile_custom_fields). Validation is done before any mutations so that invalid field names are rejected cleanly. Fixes #36819. Co-Authored-By: Mateusz Mandera <mateusz.mandera@zulip.com> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
from typing import TypedDict
|
|
|
|
|
|
class JwtAuthKey(TypedDict):
|
|
key: str
|
|
# See https://pyjwt.readthedocs.io/en/latest/algorithms.html for a list
|
|
# of supported algorithms.
|
|
algorithms: list[str]
|
|
|
|
|
|
class SAMLIdPConfigDict(TypedDict, total=False):
|
|
entity_id: str
|
|
url: str
|
|
slo_url: str
|
|
sp_initiated_logout_enabled: bool
|
|
attr_user_permanent_id: str
|
|
attr_first_name: str
|
|
attr_last_name: str
|
|
attr_username: str
|
|
attr_email: str
|
|
attr_org_membership: str
|
|
auto_signup: bool
|
|
display_name: str
|
|
display_icon: str
|
|
limit_to_subdomains: list[str]
|
|
extra_attrs: list[str]
|
|
x509cert: str
|
|
x509cert_path: str
|
|
|
|
|
|
class OIDCIdPConfigDict(TypedDict, total=False):
|
|
oidc_url: str
|
|
display_name: str
|
|
display_icon: str | None
|
|
client_id: str
|
|
secret: str | None
|
|
auto_signup: bool
|
|
limit_to_subdomains: list[str]
|
|
|
|
|
|
class SCIMConfigDict(TypedDict, total=False):
|
|
bearer_token: str
|
|
scim_client_name: str
|
|
name_formatted_included: bool
|
|
create_guests_without_streams: bool
|
|
custom_profile_field_map: dict[str, str]
|