using OTSSignsOrchestrator.Core.Models.DTOs; namespace OTSSignsOrchestrator.Core.Services; /// /// Provisions SAML applications in Authentik and retrieves IdP metadata /// needed to render the Xibo SAML settings-custom.php template. /// public interface IAuthentikService { /// /// Creates an Authentik SAML provider and application for the given Xibo instance, /// then fetches the IdP metadata (entity ID, x509 cert, SSO/SLO URLs). /// If the application already exists (by slug), returns its existing metadata. /// Task ProvisionSamlAsync( string instanceAbbrev, string instanceBaseUrl, CancellationToken ct = default); /// /// Tests the connection to Authentik by fetching the current user. /// Optionally accepts override URL/key for testing before saving. /// Task<(bool Success, string Message)> TestConnectionAsync( string? overrideUrl = null, string? overrideApiKey = null, CancellationToken ct = default); /// /// Returns all available flows from Authentik. /// Task> ListFlowsAsync( string? overrideUrl = null, string? overrideApiKey = null, CancellationToken ct = default); /// /// Returns all certificate keypairs from Authentik. /// Task> ListKeypairsAsync( string? overrideUrl = null, string? overrideApiKey = null, CancellationToken ct = default); }