Class ConfigurationExtensions
- Namespace
- Keycloak.AuthServices.Common
- Assembly
- Keycloak.AuthServices.Common.dll
public static class ConfigurationExtensions
- Inheritance
-
ConfigurationExtensions
- Inherited Members
Methods
BindKeycloakOptions<T>(IConfiguration, T, string)
Binds the Keycloak options from the configuration section with the specified name to the provided options instance.
public static void BindKeycloakOptions<T>(this IConfiguration configuration, T options, string configSectionName = "Keycloak") where T : KeycloakInstallationOptions
Parameters
configurationIConfigurationThe configuration instance.
optionsTThe options instance to bind the configuration to.
configSectionNamestringThe name of the configuration section. Default is ConfigurationConstants.ConfigurationPrefix.
Type Parameters
TThe type of the Keycloak options.
BindKeycloakOptions<T>(IConfigurationSection, T)
Binds the Keycloak options from the configuration section to the provided options instance.
public static void BindKeycloakOptions<T>(this IConfigurationSection configurationSection, T options) where T : KeycloakInstallationOptions
Parameters
configurationSectionIConfigurationSectionoptionsTThe options instance to bind the configuration to.
Type Parameters
TThe type of the Keycloak options.
GetKeycloakOptions<T>(IConfiguration, string)
Retrieves the Keycloak options from the configuration section with the specified name.
public static T? GetKeycloakOptions<T>(this IConfiguration configuration, string configSectionName = "Keycloak") where T : KeycloakInstallationOptions
Parameters
configurationIConfigurationThe configuration instance.
configSectionNamestringThe name of the configuration section. Default is ConfigurationConstants.ConfigurationPrefix.
Returns
- T
The Keycloak options instance.
Type Parameters
TThe type of the Keycloak options.
GetKeycloakOptions<T>(IConfigurationSection)
Retrieves the Keycloak options from the configuration section
public static T? GetKeycloakOptions<T>(this IConfigurationSection configurationSection) where T : KeycloakInstallationOptions
Parameters
configurationSectionIConfigurationSection
Returns
- T
The Keycloak options instance.
Type Parameters
TThe type of the Keycloak options.