2025-02-04 09:21:06 -05:00
|
|
|
# Copyright 2023 Nordeck IT + Consulting GmbH
|
2025-02-11 14:00:07 -05:00
|
|
|
# Copyright 2025 New Vector Ltd.
|
2025-02-04 09:21:06 -05:00
|
|
|
#
|
2025-02-10 15:01:20 -05:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
2025-02-12 15:42:18 -05:00
|
|
|
# Please see LICENSE files in the project root for full details.
|
2025-02-04 09:21:06 -05:00
|
|
|
#
|
2025-02-10 15:01:20 -05:00
|
|
|
# Originally licensed under the Apache License, Version 2.0:
|
|
|
|
|
# <http://www.apache.org/licenses/LICENSE-2.0>.
|
2025-02-04 09:21:06 -05:00
|
|
|
|
2026-01-14 15:45:46 +00:00
|
|
|
from typing import Optional
|
|
|
|
|
|
2025-02-04 09:21:06 -05:00
|
|
|
import attr
|
|
|
|
|
|
|
|
|
|
|
2026-01-14 15:45:46 +00:00
|
|
|
@attr.s(frozen=True, auto_attribs=True)
|
|
|
|
|
class MasConfig:
|
|
|
|
|
admin_api_base_url: str
|
|
|
|
|
oauth_base_url: str
|
|
|
|
|
client_id: str
|
|
|
|
|
# TODO: Add a filepath option for the secret as well.
|
|
|
|
|
client_secret: str
|
|
|
|
|
|
|
|
|
|
|
2025-02-04 09:21:06 -05:00
|
|
|
@attr.s(frozen=True, auto_attribs=True)
|
|
|
|
|
class GuestModuleConfig:
|
|
|
|
|
user_id_prefix: str
|
|
|
|
|
display_name_suffix: str
|
|
|
|
|
enable_user_reaper: bool
|
|
|
|
|
user_expiration_seconds: int
|
2026-01-14 15:45:46 +00:00
|
|
|
mas: Optional[MasConfig] = None
|