public class UALCreator
extends java.lang.Object
.ual file.
The class requires the following files to perform the binding operation:
The bind operation can be performed when the user is online or offline.
UAL requires native code contained in the UALJNI library; this
library must be installed on the machine in order to use this class. UAL
should only be used on machines that are physically secured.
| Constructor and Description |
|---|
UALCreator(CredentialReader credentialReader,
SecureStringBuffer password)
Instantiates a
UALCreator using a user's credential
reader. |
UALCreator(java.lang.String entrustIniFile,
java.lang.String epf,
SecureStringBuffer password)
Instantiates a
UALCreator using a user's EPF and Entrust
INI file. |
UALCreator(User user,
SecureStringBuffer password)
Instantiates a
UALCreator using an already logged in user. |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.io.OutputStream ual)
Binds the user's password and writes the
.ual credentials
file to the given output stream. |
void |
setConnections(LdapDirectory directory,
ManagerTransport managerTransport)
Sets the connections to a Public Key Infrastructure (PKI).
|
void |
setConnections(java.lang.String entrustIniFile)
Sets the connections to the Entrust Authority Security Manager (EASM)
using settings retrieved from the user's
entrust.ini file. |
public UALCreator(CredentialReader credentialReader, SecureStringBuffer password)
UALCreator using a user's credential
reader.
The user is not logged in by this constructor; login will automatically occur at the first attempt to bind the password to the machine. This constructor can be followed by a call to set the user's connections to their Public Key Infrastructure (PKI) via either of the following:
credentialReader - the credential reader that will be used to read the user's
digital identitypassword - the user's passwordjava.lang.IllegalArgumentException - if any of the parameters are not set (null)public UALCreator(User user, SecureStringBuffer password) throws UserNotLoggedInException
UALCreator using an already logged in user.
The setConnection method does not need to be called if
this constructor is used.
user - the user that will performing the UAL password bind action
(must be logged in)password - the user's passwordUserNotLoggedInException - if user is not logged injava.lang.IllegalArgumentException - if any of the parameters are not set (null)public UALCreator(java.lang.String entrustIniFile,
java.lang.String epf,
SecureStringBuffer password)
throws UserFatalException,
java.io.FileNotFoundException,
UserBadPasswordException
UALCreator using a user's EPF and Entrust
INI file.
The user is automatically logged in by this call. The
setConnection method does not need to be called if this
constructor is used; the connections are parsed from the INI file and
automatically setup.
entrustIniFile - path to the entrust.ini fileepf - path to the user's .epf filepassword - the user's passwordjava.io.FileNotFoundException - if either the user's EPF or Entrust INI file could not be
found at the location indicatedUserBadPasswordException - if the password provided for the user is incorrectUserFatalException - if login fails for any other reason, such as being unable
to find a valid CA certificate.public void setConnections(LdapDirectory directory, ManagerTransport managerTransport) throws UserFatalException
directory - the connection to the Directory (OPTIONAL)managerTransport - the connection to the CA (OPTIONAL)UserFatalException - if the connection to the CA and/or Directory, when provided,
cannot be used (incorrect IP/Port, service down or not
available)User.setConnections(LdapDirectory, ManagerTransport)public void setConnections(java.lang.String entrustIniFile)
throws java.io.FileNotFoundException,
UserFatalException
entrust.ini file.entrustIniFile - the location of the user's entrust.ini filejava.io.FileNotFoundException - if the entrust.ini file could not be foundUserFatalException - if the connections could not be set properly (entrust.ini
not correctly formatted or missing entries, Directory not
available)User.setConnections(String)public void bind(java.io.OutputStream ual)
throws UserFatalException
.ual credentials
file to the given output stream.
ual - output stream to which the generated .ual file
is writtenUserFatalException - thrown if Server Login is not permitted for this user, or
if binding fails