Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ private class ProviderClaim(string value, string description) : IProviderClaim
public string LongDescription => string.Empty;
}

// Constants

/// <summary>
/// The section of the configuration file that could be used to configure the provider.
/// </summary>
public const string SettingsSection = "Security.OpenIDConnect";

#endregion

#region [ Constructors ]
Expand Down Expand Up @@ -161,7 +168,7 @@ private static ClaimType[] ClaimTypes
/// <param name="settings"></param>
public static void DefineSettings(Settings settings)
{
dynamic section = settings["Security.OpenIDConnect"];
dynamic section = settings[SettingsSection];

section.Scopes = ("profile", "Defines the scopes requested from the OpenID Connect provider in a comma sepperated list.");
section.ClientId = ("ClientID", "Defines the client ID of the application.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
using System.DirectoryServices;
using System.Linq;
using System.Management;
using System.Runtime.CompilerServices;
using System.Security.Claims;
using System.Security.Principal;
using System.Text.RegularExpressions;
using Gemstone.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Gemstone.Security.AuthenticationProviders;
Expand Down Expand Up @@ -84,6 +84,13 @@ private class ProviderClaim(string value, string description) : IProviderClaim
public string LongDescription => string.Empty;
}

// Constants

/// <summary>
/// The section of the configuration file that could be used to configure the provider.
/// </summary>
public const string SettingsSection = "WindowsAuthentication";

#endregion

#region [ Constructors ]
Expand Down Expand Up @@ -304,6 +311,18 @@ private static string Escape(string ldapValue)
[GeneratedRegex(@"\\.|[()\0]")]
private static partial Regex SpecialCharacterPattern();

/// <summary>
/// Defines the settings used to configure the <see cref="WindowsAuthenticationProvider"/> in the Configuration File.
/// </summary>
/// <param name="settings">The instance in which to define the settings.</param>
public static void DefineSettings(Settings settings)
{
dynamic section = settings[SettingsSection];

section.LDAPPath = ("", "Root path from which LDAP searches should be performed");
section.AllowLocalAccounts = (false, "Indicates whether the UI will also search local Users and Groups");
}

#endregion
}

Expand Down
Loading