// Copyright 2022 Valters Melnalksnis // Licensed under the Apache License 2.0. // See LICENSE file in the project root for full license information. using System; using System.ComponentModel.DataAnnotations; namespace VMelnalksnis.NordigenDotNet; /// Options for configuring . public sealed record NordigenOptions { /// The name of the configuration section. public const string SectionName = "Nordigen"; /// Gets the base address of the Nordigen API. [Required] public Uri BaseAddress { get; init; } = new("https://ob.nordigen.com/"); /// Gets the secret ID used to create new access tokens. [Required] public string SecretId { get; init; } = null!; /// Gets the secret key used to create new access tokens. [Required] public string SecretKey { get; init; } = null!; /// Gets the factor by which to divide the expiration time for access and refresh tokens. public double ExpirationFactor { get; init; } = 2d; }