Class ConfigurationExtensions
Inheritance
System.Object
ConfigurationExtensions
Namespace: Steeltoe.Common.Security
Assembly: Steeltoe.Common.Security.dll
Syntax
public static class ConfigurationExtensions : object
Methods
| Edit this page View SourceAddCertificateFile(IConfigurationBuilder, String, Boolean)
Adds information on a certificate file to configuration, for use with CertificateOptions
Declaration
public static IConfigurationBuilder AddCertificateFile(this IConfigurationBuilder builder, string certFilePath, bool optional = false)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationBuilder | builder | Your |
System.String | certFilePath | The path on disk to locate a valid certificate file |
System.Boolean | optional | Whether or not to throw an exception if the file isn't found |
Returns
Type | Description |
---|---|
IConfigurationBuilder |
Remarks
In contast with AddPemFiles(IConfigurationBuilder, String, String, Boolean), this extension adds the path of the file instead of the contents. Certificate parsing is handled by ConfigureCertificateOptions
AddPemFiles(IConfigurationBuilder, String, String, Boolean)
Adds the contents of pem encoded certificate and key files to configuration, for use with CertificateOptions
Declaration
public static IConfigurationBuilder AddPemFiles(this IConfigurationBuilder builder, string certFilePath, string keyFilePath, bool optional = false)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationBuilder | builder | Your |
System.String | certFilePath | The path on disk to locate a valid pem-encoded certificate file |
System.String | keyFilePath | The path on disk to locate a valid pem-encoded RSA key |
System.Boolean | optional | Whether or not to throw an exception if the files aren't found |
Returns
Type | Description |
---|---|
IConfigurationBuilder |