// 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 of the issuer, https://{Host}/: the discovery documents, the key set and the endpoints /// clients call directly (token, user information, revocation, introspection). /// public string Host { get; set; } = "credentials.progmasoft.com"; /// /// The host name of the pages people see: the authorization endpoint with its sign-in and consent screen, the end /// session endpoint, and the applications an account has allowed. /// public string AuthorizeHost { get; set; } = "authorize.progmasoft.com"; /// /// The host name of the Progmasoft Cloud Console, where developers make and manage the tokens of their /// applications. It has its own sign-in; the protocol endpoints stay on . /// public string ConsoleHost { get; set; } = "console.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}/"); }