To allow supplying the `client_secret` in a file, instead of directly in the configuration. I've found that ESS prefer this method in the past, so the entire config does not need to be a secret.
31 lines
810 B
Python
31 lines
810 B
Python
# Copyright 2023 Nordeck IT + Consulting GmbH
|
|
# Copyright 2025 New Vector Ltd.
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
# Please see LICENSE files in the project root for full details.
|
|
#
|
|
# Originally licensed under the Apache License, Version 2.0:
|
|
# <http://www.apache.org/licenses/LICENSE-2.0>.
|
|
|
|
from typing import Optional
|
|
|
|
import attr
|
|
|
|
|
|
@attr.s(frozen=True, auto_attribs=True)
|
|
class MasConfig:
|
|
admin_api_base_url: str
|
|
oauth_base_url: str
|
|
client_id: str
|
|
client_secret: Optional[str] = None
|
|
client_secret_filepath: Optional[str] = None
|
|
|
|
|
|
@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
|
|
mas: Optional[MasConfig] = None
|