public static interface SystemAuthenticationControl.ScriptBuilder
Each method call on the builder adds a line to the script and then the
script may be built using the script
method which produces a String script which may be sent to the server
using updateStore
.
Such a builder may be created using the
scriptBuilder
method.
Modifier and Type | Method and Description |
---|---|
SystemAuthenticationControl.ScriptBuilder |
abstainAnonymousConnections()
Instruct the system authentication handler to defer authentication
decisions for anonymous connections to subsequent handlers.
|
SystemAuthenticationControl.ScriptBuilder |
addPrincipal(String name,
String password,
Set<String> roles)
Add a new principal.
|
SystemAuthenticationControl.ScriptBuilder |
allowAnonymousConnections(Set<String> roles)
Instruct the system authentication handler to allow anonymous
connections.
|
SystemAuthenticationControl.ScriptBuilder |
assignRoles(String principal,
Set<String> roles)
Change a principal's assigned roles.
|
SystemAuthenticationControl.ScriptBuilder |
denyAnonymousConnections()
Instruct the system authentication handler to deny anonymous
connections.
|
SystemAuthenticationControl.ScriptBuilder |
removePrincipal(String principal)
Remove a principal.
|
String |
script()
Create a script.
|
SystemAuthenticationControl.ScriptBuilder |
setPassword(String principal,
String password)
Set a principal's password.
|
SystemAuthenticationControl.ScriptBuilder |
verifyPassword(String principal,
String password)
Assert that a principal's password is
password . |
SystemAuthenticationControl.ScriptBuilder addPrincipal(String name, String password, Set<String> roles) throws IllegalArgumentException
The script will fail if the principal is already defined at the server.
name
- principal namepassword
- passwordroles
- assigned roles, may be emptyIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder setPassword(String principal, String password) throws IllegalArgumentException
The principal must already be defined at the server in order to set the password.
principal
- principal namepassword
- passwordIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder verifyPassword(String principal, String password) throws IllegalArgumentException
password
.
This command does not update the store. It can be used in conjunction
with setPassword
to create a
script that updates a password only if the previous password is
supplied.
principal
- principal namepassword
- passwordIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder assignRoles(String principal, Set<String> roles) throws IllegalArgumentException
The specified principal must already be defined at the server.
principal
- principal nameroles
- assigned rolesIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder removePrincipal(String principal) throws IllegalArgumentException
The principal must be one that is already defined at the server.
principal
- principal nameIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder allowAnonymousConnections(Set<String> roles) throws IllegalArgumentException
roles
- roles to assign to anonymous sessions. This may be emptyIllegalArgumentException
- if any parameter is nullSystemAuthenticationControl.ScriptBuilder denyAnonymousConnections() throws IllegalArgumentException
IllegalArgumentException
SystemAuthenticationControl.ScriptBuilder abstainAnonymousConnections() throws IllegalArgumentException
IllegalArgumentException
String script()
Copyright © 2016 Push Technology Ltd. All Rights Reserved.