Class BasicAuthenticationModuleExtensions
Provides extension methods for BasicAuthenticationModule.
Inherited Members
Namespace: EmbedIO.Authentication
Syntax
public static class BasicAuthenticationModuleExtensions
Methods
WithAccount(BasicAuthenticationModule, String, String)
Adds a user name and password to the Accounts dictionary of a BasicAuthenticationModule.
Declaration
public static BasicAuthenticationModule WithAccount(this BasicAuthenticationModule this, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
BasicAuthenticationModule | this | The BasicAuthenticationModule on which this method is called. |
String | userName | The user name. |
String | password | The password. |
Returns
Type | Description |
---|---|
BasicAuthenticationModule |
|
Remarks
If a userName
account already exists,
its password is replaced with password
.
WithAccounts(BasicAuthenticationModule, IEnumerable<KeyValuePair<String, String>>)
Adds a dictionary of user names and passwords to the Accounts dictionary of a BasicAuthenticationModule.
Declaration
public static BasicAuthenticationModule WithAccounts(this BasicAuthenticationModule this, IEnumerable<KeyValuePair<string, string>> accounts)
Parameters
Type | Name | Description |
---|---|---|
BasicAuthenticationModule | this | The BasicAuthenticationModule on which this method is called. |
IEnumerable<KeyValuePair<String, String>> | accounts | An enumeration of key / value pairs representing the user names and passwords to add.. |
Returns
Type | Description |
---|---|
BasicAuthenticationModule |
|