< Summary

Information
Class: ProjectTemplate.Web.Authentication.Providers.Saml2.Saml2AuthenticationOptions
Assembly: ProjectTemplate.Web
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Providers/Saml2/TemplateSaml2AuthenticationOptions.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 62
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Enabled()100%11100%
get_Scheme()100%11100%
get_DisplayName()100%11100%
get_EntityId()100%11100%
get_MetadataUrl()100%11100%
get_ModulePath()100%11100%
get_LoadMetadata()100%11100%
get_RequireSignedAssertions()100%11100%
get_ValidateCertificates()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Providers/Saml2/TemplateSaml2AuthenticationOptions.cs

#LineLine coverage
 1namespace ProjectTemplate.Web.Authentication.Providers.Saml2;
 2
 3/// <summary>
 4/// Represents SAML2 authentication provider configuration.
 5/// </summary>
 6public sealed class Saml2AuthenticationOptions
 7{
 8    /// <summary>
 9    /// Gets or sets a value indicating whether the feature is enabled.
 10    /// </summary>
 91011    public bool Enabled { get; set; }
 12
 13    /// <summary>
 14    /// Gets or sets the authentication scheme used for the current operation.
 15    /// </summary>
 94016    public string Scheme { get; set; } = "Saml2";
 17
 18    /// <summary>
 19    /// Gets or sets the display name associated with the SAML2 entity.
 20    /// </summary>
 94421    public string DisplayName { get; set; } = "SAML2";
 22
 23    /// <summary>
 24    /// Gets or sets the unique identifier for the entity.
 25    /// </summary>
 94026    public string EntityId { get; set; } = string.Empty;
 27
 28    /// <summary>
 29    /// Gets or sets the URL of the metadata endpoint associated with this instance.
 30    /// </summary>
 94231    public string MetadataUrl { get; set; } = string.Empty;
 32
 33    /// <summary>
 34    /// Gets or sets the relative request path that the application listens on for SAML2 authentication callbacks.
 35    /// </summary>
 36    /// <remarks>This path is used by the authentication middleware to receive SAML2 assertions from the
 37    /// identity provider. It should match the Assertion Consumer Service (ACS) endpoint configured with the identity
 38    /// provider.</remarks>
 94239    public string ModulePath { get; set; } = "/Saml2/Acs";
 40
 41    /// <summary>
 42    /// Gets or sets a value indicating whether metadata should be loaded.
 43    /// </summary>
 93044    public bool LoadMetadata { get; set; } = true;
 45
 46    /// <summary>
 47    /// Gets or sets a value indicating whether assertions must be signed.
 48    /// </summary>
 49    /// <remarks>Set this property to <see langword="true"/> to require that all assertions are
 50    /// cryptographically signed for validation. This enhances security by ensuring the authenticity and integrity of
 51    /// assertions. If set to <see langword="false"/>, unsigned assertions will be accepted, which may reduce
 52    /// security.</remarks>
 93853    public bool RequireSignedAssertions { get; set; } = true;
 54
 55    /// <summary>
 56    /// Gets or sets a value indicating whether to validate SSL certificates during secure connections.
 57    /// </summary>
 58    /// <remarks>Set this property to <see langword="false"/> to disable certificate validation, which may
 59    /// expose the connection to security risks. It is recommended to leave this property set to <see langword="true"/>
 60    /// in production environments.</remarks>
 93861    public bool ValidateCertificates { get; set; } = true;
 62}