349 lines
10 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using System.Linq;
namespace gehGassi.Web.Helper
{
/// <summary>
/// Optionen für Spracheinstellungen
/// </summary>
public class LocalizationOptions
{
/// <summary>
/// Standard-Culture / Sprache
/// </summary>
public string DefaultCulture { get; set; }
/// <summary>
/// Verfügbare Sprachen
/// </summary>
public string Languages { get; set; }
/// <summary>
/// Gibt eine Liste der Sprachen als ISO2 Code zurück
/// </summary>
/// <returns>Liste Sprachen</returns>
public List<string> GetLanguages()
{
return Languages.Split(",").ToList();
}
}
/// <summary>
/// Options-Klasse für den Versand von Bestätigungs-Emails
/// </summary>
public class EmailSenderOptions
{
/// <summary>
/// Key
/// </summary>
public string SendGridKey { get; set; }
/// <summary>
/// Name des Absenders einer Email
/// </summary>
public string Name { get; set; }
/// <summary>
/// E-Mail Adresse des Absenders
/// </summary>
public string Email { get; set; }
}
/// <summary>
/// Options-Klasse für die Lizenz
/// </summary>
public class LicenseOptions
{
/// <summary>
/// Web-Adresse Produkt
/// </summary>
public string Address { get; set; }
/// <summary>
/// Name der Software / Produkt
/// </summary>
public string Software { get; set; }
/// <summary>
/// Versionsnummer
/// </summary>
public string Version { get; set; }
}
/// <summary>
/// Options-Klasse für SystemJs Einstellungen
/// </summary>
public class SystemJsOptions
{
/// <summary>
/// Welche Versionsnummer soll an js Dateien die mittels systemjs importiert werden angehängt werden?
/// Z.B. Events.js?v=x.x.x
/// </summary>
public string FileVersion { get; set; }
}
/// <summary>
/// Options-Klasse für die Einstellunge der File-Services
/// </summary>
public class FileServiceModeOptions
{
/// <summary>
/// Sollen die Cloud-Provider verwendet werden?
/// </summary>
public bool Cloud { get; set; }
/// <summary>
/// Connection-String zum Azure-Storage
/// </summary>
public string AzureStorage { get; set; }
}
/// <summary>
/// Einstellungen für die Session
/// </summary>
public class SessionSettings
{
/// <summary>
/// Timeout in Minuten für Backend
/// </summary>
public int TimeOut { get; set; }
/// <summary>
/// Wann soll die Warnung erfolgen Backend
/// </summary>
public int Warning { get; set; }
/// <summary>
/// Autologout aktiv Backend?
/// </summary>
public bool Autologout { get; set; }
/// <summary>
/// Timeout in Minuten für Client
/// </summary>
public int ClientTimeOut { get; set; }
/// <summary>
/// Wann soll die Warnung erfolgen Client
/// </summary>
public int ClientWarning { get; set; }
/// <summary>
/// Autologout aktiv Client?
/// </summary>
public bool ClientAutologout { get; set; }
/// <summary>
/// Soll ein Persistent-Cookie verwendet werden?
/// </summary>
public bool PersistentCookie { get; set; }
}
/// <summary>
/// Optionen für Aktivieren / Deaktivieren AppInsights
/// </summary>
public class ApplicationInsightsOptions
{
/// <summary>
/// Aktiv oder nicht
/// </summary>
public bool IsEnabled { get; set; }
}
/// <summary>
/// Optionen für die Einstellungen für Identity
/// </summary>
public class AuthOptions
{
/// <summary>
/// Benutzer müssen die Email-Adresse betätigen
/// </summary>
public bool MustConfirmEmail { get; set; }
}
/// <summary>
/// Optionen für den FIDO2 Einsatz
/// </summary>
public class Fido2Options
{
/// <summary>
/// This member specifies a time, in milliseconds, that the caller is willing to wait for the call to complete.
/// This is treated as a hint, and MAY be overridden by the client.
/// </summary>
public uint Timeout { get; set; } = 60000;
/// <summary>
/// TimestampDriftTolerance specifies a time in milliseconds that will be allowed for clock drift on a timestamped attestation.
/// </summary>
public int TimestampDriftTolerance { get; set; } = 0; //Pretty sure 0 will never work - need a better default?
/// <summary>
/// The size of the challenges sent to the client
/// </summary>
public int ChallengeSize { get; set; } = 16;
/// <summary>
/// The effetive domain of the RP. Should be unique and will be used as the identity for the RP.
/// </summary>
public string ServerDomain { get; set; }
/// <summary>
/// A human friendly name of the RP
/// </summary>
public string ServerName { get; set; }
/// <summary>
/// A serialized URL which resolves to an image associated with the entity.For example, this could be a users avatar or a Relying Party's logo. This URL MUST be an a priori authenticated URL. Authenticators MUST accept and store a 128-byte minimum length for an icon members value. Authenticators MAY ignore an icon members value if its length is greater than 128 bytes. The URLs scheme MAY be "data" to avoid fetches of the URL, at the cost of needing more storage.
/// </summary>
public string ServerIcon { get; set; }
/// <summary>
/// Server origin, including protocol host and port.
/// </summary>
public string Origin { get; set; }
/// <summary>
/// MDSAccessKey
/// </summary>
public string MDSAccessKey { get; set; }
/// <summary>
/// MDSCacheDirPath
/// </summary>
public string MDSCacheDirPath { get; set; }
/// <summary>
/// Create the configuration for Fido2
/// </summary>
public Fido2Options()
{
}
}
/// <summary>
/// Optionen für den JWT-Token Einsatz
/// </summary>
public class JwtTokenOptions
{
public string ValidAudience { get; set; }
public string ValidIssuer { get; set; }
public string Secret { get; set; }
public int TokenMinutes { get; set; }
public int RefreshTokenMinutes { get; set; }
}
/// <summary>
/// Optionen für das Einstellen des Caches für static files
/// </summary>
public class CachingOptions
{
/// <summary>
/// Caching in Sekunden für /Lib/
/// </summary>
public int Lib { get; set; }
/// <summary>
/// Caching in Sekunden für /Config/
/// </summary>
public int Config { get; set; }
/// <summary>
/// Caching in Sekunden für /Scripts/
/// </summary>
public int Scripts { get; set; }
/// <summary>
/// Caching in Sekunden für /Images/
/// </summary>
public int Images { get; set; }
/// <summary>
/// Caching in Sekunden für Resource-Dateien
/// </summary>
public int ResourcesCache { get; set; }
/// <summary>
/// Caching in Sekunden für Rest
/// </summary>
public int Default { get; set; }
}
/// <summary>
/// Optionen für die Einstellungen des Backgroundservice
/// </summary>
public class BackgroundServiceOptions
{
/// <summary>
/// Intervall in Sekunden für den Backgroundservice
/// </summary>
public int TimerIntervalInSeconds { get; set; }
/// <summary>
/// Wie lange hat ein Benutzer Zeit einen aktiv gebuchten Walk zu bezahlen
/// </summary>
public int CancelPendingMinutes { get; set; }
/// <summary>
/// Sollen Walks die abgeschlossen wurden automatisch als bestätigt gesetzt werden, wenn die Zeit abgelaufen ist?
/// </summary>
public bool AutoConfirm { get; set; }
/// <summary>
/// Wie lange hat ein Benutzer Zeit einen aktiv gebuchten Walk zu bestätigen bis dieser automatisch bestätigt wird
/// </summary>
public int ConfirmationMinutes { get; set; }
/// <summary>
/// Nach wie vielen Minuten wird eine Erinnerung an den Benutzer gesendet, dass er einen Walk bestätigen soll
/// </summary>
public int ConfirmationReminderMinutes { get; set; }
/// <summary>
/// Sollen Walks die aktiv sind oder gestartet wurden automatisch als abgeschlossen gesetzt werden, wenn die Zeit abgelaufen ist?
/// </summary>
public bool AutoComplete { get; set; }
/// <summary>
/// Zeit bis ein Walk als abgeschlossen gilt, auch wenn der Benutzer dies nicht bestätigt
/// </summary>
public int CompleteMinutes { get; set; }
/// <summary>
/// Mindest-Betrag der ausgezahlt werden kann in der kleinsten Einheit der Währung (z.B. Cent)
/// </summary>
public long MinPayoutAmmount { get; set; }
}
/// <summary>
/// Optionen für Apple für die Prüfung von Benutzern
/// </summary>
public class AppleOptions
{
/// <summary>
/// Client-ID von Apple
/// </summary>
public string ClientId { get; set; }
/// <summary>
/// Team-ID von Apple
/// </summary>
public string TeamId { get; set; }
/// <summary>
/// Key-Id von Apple (siehe AuthKey_{{YOUR KEY ID}}.p8)
/// </summary>
public string KeyId { get; set; }
}
/// <summary>
/// Optionen für Reklamationen
/// </summary>
public class WalkComplaintOptions
{
/// <summary>
/// Ziel-Email Adresse für eine Benachrichtigung
/// </summary>
public string Email { get; set; }
}
}