Table of Contents

Class ConfigurationExtensions

Namespace
Steeltoe.Common.Security
Assembly
Steeltoe.Common.Security.dll
public static class ConfigurationExtensions
Inheritance
ConfigurationExtensions
Inherited Members

Methods

AddCertificateFile(IConfigurationBuilder, string, bool)

Adds information on a certificate file to configuration, for use with CertificateOptions

public static IConfigurationBuilder AddCertificateFile(this IConfigurationBuilder builder, string certFilePath, bool optional = false)

Parameters

builder IConfigurationBuilder

Your IConfigurationBuilder

certFilePath string

The path on disk to locate a valid certificate file

optional bool

Whether or not to throw an exception if the file isn't found

Returns

IConfigurationBuilder

Remarks

In contast with AddPemFiles(IConfigurationBuilder, string, string, bool), this extension adds the path of the file instead of the contents. Certificate parsing is handled by ConfigureCertificateOptions

AddPemFiles(IConfigurationBuilder, string, string, bool)

Adds the contents of pem encoded certificate and key files to configuration, for use with CertificateOptions

public static IConfigurationBuilder AddPemFiles(this IConfigurationBuilder builder, string certFilePath, string keyFilePath, bool optional = false)

Parameters

builder IConfigurationBuilder

Your IConfigurationBuilder

certFilePath string

The path on disk to locate a valid pem-encoded certificate file

keyFilePath string

The path on disk to locate a valid pem-encoded RSA key

optional bool

Whether or not to throw an exception if the files aren't found

Returns

IConfigurationBuilder