Interface IScriptBuilder
The script builder used to create a script of commands to apply to the system authentication store at the server.
Inherited Members
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients
Assembly: Diffusion.Client.dll
Syntax
public interface IScriptBuilder : ISystemAuthenticationControlScriptBuilder
Remarks
Each method call on the builder adds a line to the script and then the script may be built using the
ToScript() method which produces a
This builder can be accessed with the Script property.
Methods
AbstainAnonymousConnections()
Instructs the system authentication handler to defer authentication decisions for anonymous connections to subsequent handlers.
Declaration
IScriptBuilder AbstainAnonymousConnections()
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also abstains anonymous connections. |
AddPrincipal(String, String, IEnumerable<String>)
Adds a new principal.
Declaration
IScriptBuilder AddPrincipal(string name, string password, IEnumerable<string> roles)
Parameters
Type | Name | Description |
---|---|---|
String | name | The principal name. |
String | password | The password. |
IEnumerable<String> | roles | The roles to be assigned to the principal. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also includes the new principal. |
Remarks
The script will fail if the principal is already defined at the server.
AllowAnonymousConnections(IEnumerable<String>)
Instructs the system authentication handler to allow anonymous connections.
Declaration
IScriptBuilder AllowAnonymousConnections(IEnumerable<string> roles)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | roles | The roles to assign to anonymous sessions. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also allows anonymous connections. |
Append(IScriptBuilder)
Appends all the operations of a given builder to the current builder.
Declaration
IScriptBuilder Append(IScriptBuilder other)
Parameters
Type | Name | Description |
---|---|---|
IScriptBuilder | other | The builder to append to the current builder. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also includes all operations of |
AssignRoles(String, IEnumerable<String>)
Changes a principal's assigned roles.
Declaration
IScriptBuilder AssignRoles(string principal, IEnumerable<string> roles)
Parameters
Type | Name | Description |
---|---|---|
String | principal | The principal name. |
IEnumerable<String> | roles | The roles to be assigned to the |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also includes the new roles. |
Remarks
The specified principal must already be defined at the server.
DenyAnonymousConnections()
Instructs the system authentication handler to deny anonymous connections.
Declaration
IScriptBuilder DenyAnonymousConnections()
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also denies anonymous connections. |
RemovePrincipal(String)
Removes a principal.
Declaration
IScriptBuilder RemovePrincipal(string principal)
Parameters
Type | Name | Description |
---|---|---|
String | principal | The principal name. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also removes the principal. |
Remarks
The principal must be one that is already defined at the server.
SetPassword(String, String)
Sets a principal's password.
Declaration
IScriptBuilder SetPassword(string principal, string password)
Parameters
Type | Name | Description |
---|---|---|
String | principal | The principal name. |
String | password | The password. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also includes the new password. |
Remarks
The principal must already be defined at the server in order to set the password.
ToScript()
Creates a new script.
Declaration
string ToScript()
Returns
Type | Description |
---|---|
String | The script. |
VerifyPassword(String, String)
Asserts that a principal's password is the same as the given password
.
Declaration
IScriptBuilder VerifyPassword(string principal, string password)
Parameters
Type | Name | Description |
---|---|---|
String | principal | The principal name. |
String | password | The password. |
Returns
Type | Description |
---|---|
IScriptBuilder | A new copy of the current builder that also verifies the password. |
Remarks
This command does not update the store. It can be used in conjunction with SetPassword(String, String) to create a script that updates a password only if the previous password is supplied.