Show / Hide Table of Contents

Class ConfigurationCredentialProvider

Gets credentials from IConfiguration.

Inheritance
Object
ConfigurationCredentialProvider
Implements
ICredentialProvider
Namespace: NanoByte.Common.Net
Assembly: NanoByte.Common.dll
Syntax
public class ConfigurationCredentialProvider : Object, ICredentialProvider

Constructors

ConfigurationCredentialProvider(IConfiguration)

Creates a new configuration credential provider.

Declaration
public ConfigurationCredentialProvider(IConfiguration configuration)
Parameters
Type Name Description
IConfiguration configuration

The configuration containing credentials. Each URI must be a subsection with User and Password values.

Methods

GetCredential(Uri, Boolean)

Returns NetworkCredentials for a specific Uri.

Declaration
public NetworkCredential GetCredential(Uri uri, bool previousIncorrect = false)
Parameters
Type Name Description
Uri uri

The URI that the client is providing authentication for.

Boolean previousIncorrect

Reports that the credentials previously returned by this provider were incorrect.

Returns
Type Description
NetworkCredential

Implements

ICredentialProvider

Extension Methods

UpdateUtils.To<TIn, TOut>(TIn, Func<TIn, TOut>)
JsonStorage.SaveJson<T>(T, Stream)
JsonStorage.SaveJson<T>(T, String)
JsonStorage.ToJsonString<T>(T)
JsonStorage.ReparseAsJson<T>(Object)
JsonStorage.ReparseAsJson<T>(Object, T)
XmlStorage.SaveXml(Object, Stream, String)
XmlStorage.SaveXml<T>(T, String, String)
XmlStorage.ToXmlString(Object, String)
ConversionUtils.ConvertToString<TType>(TType)

See Also

ConfigureCredentials(IServiceCollection, IConfiguration)
In This Article
Back to top Copyright Bastian Eicher