public class UserLookupHelper
extends java.lang.Object
(|(objectClass=ePerson)(objectClass=Person))
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UserLookupHelper_java_copyright |
static java.lang.String |
UserLookupHelper_java_sourceCodeID |
Constructor and Description |
---|
UserLookupHelper()
Create a lookup helper.
|
Modifier and Type | Method and Description |
---|---|
User |
createUser(java.lang.String username,
java.lang.String dn,
java.lang.String password,
boolean bypassPasswordPolicy,
java.lang.String firstName,
java.lang.String lastName,
boolean accountValid,
boolean passwordValid)
Create a user in the registry.
|
boolean |
deleteUser(java.lang.String username,
boolean removeNativeUser)
Remove a user.
|
User |
getUser(java.lang.String username)
Retrieve a user from the registry
|
User |
getUserByNativeId(java.lang.String nativeId)
Retrieve a user from the registry using their native Id
|
void |
init()
Using this initializer will use the configuration of this appliances
Verify Access RTE.
|
void |
init(boolean useAuthService)
Initialize a UserLookupHelper which will use either the configuration in
the Verify Access RTE, or the configuration in the Username Password
authentication mechanism.
|
void |
init(boolean useAuthService,
java.util.Properties overrideProperties)
Initialize a UserLookupHelper which will use either the configuration in
the Verify Access RTE, or the configuration in the Username Password
authentication mechanism.
|
void |
init(LdapServerConnection connection,
java.lang.String mgmtDomain)
Initialize this lookup with a server connection.
|
void |
init(LdapServerConnection connection,
java.lang.String searchFilter,
java.lang.String mgmtDomain)
Initialize this lookup util with a server connection.
|
void |
init(LdapServerConnection connection,
java.lang.String searchFilter,
java.lang.String mgmtDomain,
boolean loginFailuresPersistent)
Initialize this lookup util with a server connection.
|
void |
init(LdapServerConnection connection,
java.lang.String searchFilter,
java.lang.String mgmtDomain,
boolean loginFailuresPersistent,
java.util.Properties overrideProperties)
Initialize this lookup util with a server connection.
|
void |
init(java.util.Properties overrideProperties)
Using this initializer will use the configuration of this appliances
Verify Access RTE.
|
void |
init(java.lang.String hostname,
int port,
java.lang.String bindDn,
java.lang.String bindDnPwd,
java.lang.String mgmtDomain,
int connectionTimeout)
Basic initialize.
|
void |
init(java.lang.String hostname,
int port,
java.lang.String bindDn,
java.lang.String bindDnPwd,
java.lang.String keystore,
java.lang.String mgmtDomain,
int connectionTimeout)
Basic initialize with TLS.
|
void |
init(java.lang.String hostname,
int port,
java.lang.String bindDn,
java.lang.String bindDnPwd,
java.lang.String keystore,
java.lang.String clientCertLabel,
java.lang.String searchFilter,
java.lang.String mgmtDomain,
int connectionTimeout)
Full initialize with options for client cert authentication and custom search
filter.
|
void |
init(java.lang.String hostname,
int port,
java.lang.String bindDn,
java.lang.String bindDnPwd,
java.lang.String keystore,
java.lang.String clientCertLabel,
java.lang.String searchFilter,
java.lang.String mgmtDomain,
int connectionTimeout,
boolean loginFailuresPersistent) |
void |
init(java.lang.String hostname,
int port,
java.lang.String bindDn,
java.lang.String bindDnPwd,
java.lang.String keystore,
java.lang.String clientCertLabel,
java.lang.String searchFilter,
java.lang.String mgmtDomain,
int connectionTimeout,
boolean loginFailuresPersistent,
java.util.Properties overrideProperties) |
boolean |
isReady()
Check if this helper is ready and has had init() called
|
java.lang.String[] |
search(java.lang.String searchAttr,
java.lang.String attrPattern,
int maxReturned)
Search users based on a given attribute pattern.
|
java.lang.String[] |
search(java.lang.String searchAttr,
java.lang.String attrPattern,
int maxReturned,
int pageSize)
Search users based on a given attribute pattern.
|
void |
shutdown()
Close any connections held by this lookup helper.
|
public static final java.lang.String UserLookupHelper_java_sourceCodeID
public static final java.lang.String UserLookupHelper_java_copyright
public UserLookupHelper()
public boolean isReady()
public void init()
public void init(java.util.Properties overrideProperties)
overrideProperties
- properties to pass down to rgy. Will be
applied after the usual properties are loaded, meaning they will override
any configuration which the util attempts to populate. If null will be
ignored.
This calls equivalent to calling init(false, properties);public void init(boolean useAuthService)
userAuthService
- if true then the username password configuration
will be used, if false then the call is the same as usingpublic void init(boolean useAuthService, java.util.Properties overrideProperties)
userAuthService
- if true then the username password configuration
will be used, if false then the call is the same as usingoverrideProperties
- properties to pass down to rgy. Will be
applied after the usual properties are loaded, meaning they will override
any configuration which the util attempts to populate. If null will be
ignored.public void init(LdapServerConnection connection, java.lang.String mgmtDomain)
connection
- the server connection to usemgmtDomain
- secure domain to usepublic void init(LdapServerConnection connection, java.lang.String searchFilter, java.lang.String mgmtDomain)
connection
- the server connection to use.custom
- search filter to use.mgmtDomain
- secure domain to usepublic void init(LdapServerConnection connection, java.lang.String searchFilter, java.lang.String mgmtDomain, boolean loginFailuresPersistent)
connection
- the server connection to use.custom
- search filter to use.mgmtDomain
- secure domain to useloginFailuresPersistent
- will failures to login be persisted.public void init(LdapServerConnection connection, java.lang.String searchFilter, java.lang.String mgmtDomain, boolean loginFailuresPersistent, java.util.Properties overrideProperties)
connection
- the server connection to use.custom
- search filter to use.mgmtDomain
- secure domain to useloginFailuresPersistent
- will failures to login be persisted.overrideProperties
- properties to pass down to rgy. Will be
applied after the usual properties are loaded, meaning they will override
any configuration which the util attempts to populate. If null will be
ignored.public void init(java.lang.String hostname, int port, java.lang.String bindDn, java.lang.String bindDnPwd, java.lang.String mgmtDomain, int connectionTimeout)
hostname
- to connect to.port
- port to connect to.bindDn
- user to bind as.BindDnPwd
- used to bind.mgmtDomain
- Verify Access domain to use.connectionTimeout
- time in seconds that an inactive connection
should be heldpublic void init(java.lang.String hostname, int port, java.lang.String bindDn, java.lang.String bindDnPwd, java.lang.String keystore, java.lang.String mgmtDomain, int connectionTimeout)
hostname
- to connect toport
- port to connect tobindDn
- user to bind asBindDnPwd
- used to bindkeystore
- to be used as ssl trust storemgmtDomain
- Verify Access domain to use.connectionTimeout
- time in seconds that an inactive connection
should be heldpublic void init(java.lang.String hostname, int port, java.lang.String bindDn, java.lang.String bindDnPwd, java.lang.String keystore, java.lang.String clientCertLabel, java.lang.String searchFilter, java.lang.String mgmtDomain, int connectionTimeout)
hostname
- to connect toport
- port to connect tobindDn
- user to bind asBindDnPwd
- used to bindkeystore
- to be used as ssl trust storeclientCertLabel
- certificate to use for client cert auth. Sourced
from the specified keystoresearchFilter
- to use for user lookupsmgmtDomain
- Verify Access domain to use.connectionTimeout
- time in seconds that an inactive connection
should be heldloginFailuresPersistent
- should login failures be persisted
Its ok to pass null for keystore and client certpublic void init(java.lang.String hostname, int port, java.lang.String bindDn, java.lang.String bindDnPwd, java.lang.String keystore, java.lang.String clientCertLabel, java.lang.String searchFilter, java.lang.String mgmtDomain, int connectionTimeout, boolean loginFailuresPersistent)
public void init(java.lang.String hostname, int port, java.lang.String bindDn, java.lang.String bindDnPwd, java.lang.String keystore, java.lang.String clientCertLabel, java.lang.String searchFilter, java.lang.String mgmtDomain, int connectionTimeout, boolean loginFailuresPersistent, java.util.Properties overrideProperties)
public void shutdown()
public User getUser(java.lang.String username)
username
- to retrievepublic User getUserByNativeId(java.lang.String nativeId)
native
- id of the user to retrievepublic User createUser(java.lang.String username, java.lang.String dn, java.lang.String password, boolean bypassPasswordPolicy, java.lang.String firstName, java.lang.String lastName, boolean accountValid, boolean passwordValid)
username
- userid for the user to create.dn
- the registry id for the user to create.password
- the password for the user.bypassPasswordPolicy
- if password policy should be enforced when creating this user.accountValid
- is this account valid.passwordValid
- is the password valid.public boolean deleteUser(java.lang.String username, boolean removeNativeUser)
username
- of the user to removeremoveNativeUser
- if the user should be removed from the directory
instead of just the secure domain.public java.lang.String[] search(java.lang.String searchAttr, java.lang.String attrPattern, int maxReturned)
searchAttr
- the attribute to search onattrPattern
- the pattern the provided attribute must match.
Wildcards('*') are allowed.maxReturned
- Limit on search resultspublic java.lang.String[] search(java.lang.String searchAttr, java.lang.String attrPattern, int maxReturned, int pageSize)
searchAttr
- the attribute to search onattrPattern
- the pattern the provided attribute must match.
Wildcards('*') are allowed.maxReturned
- Limit on search resultspageSize
- indicates to the registry the pagesize to be used. Will
be ignored if value passed in is not a positive integer.