// SPDX-FileCopyrightText: 2026 Progmasoft // SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 namespace Progmasoft.OAuth; /// Settings of Progmasoft OAuth, the OAuth 2.1 and OpenID Connect provider of Progmasoft accounts. internal sealed class OAuthOptions { /// The configuration section of these settings. public const string SectionName = "OAuth"; /// The host name Progmasoft OAuth answers on; the issuer is https://{Host}/. public string Host { get; set; } = "credentials.progmasoft.com"; /// /// PEM file with the RSA private key that signs identity and access tokens. Required in production; other /// environments use a key that lives as long as the process. /// public string? SigningKeyPath { get; set; } /// /// File with the base64 text of the 256-bit key that encrypts access tokens, authorization codes and refresh /// tokens. Required in production, like . /// public string? EncryptionKeyPath { get; set; } /// Where a visitor without an account creates one. public string RegistrationUrl { get; set; } = "https://account.progmasoft.com/register"; /// How many applications one account may register. public int MaximumApplicationsPerAccount { get; set; } = 10; /// The issuer, derived from . public Uri Issuer => new($"https://{Host}/"); }