public final class FilenameProfileReader extends CredentialReader
When reading a Digital Identity store, the user may optionally have a connection to the Security Manager and Directory set. When these connections are not provided, key management operations are not possible (key update, DN change, ...). The user may also optionally have a credential writer set. The following credential writers can all be used with this credential reader:
FilenameProfileWriterPKCS12WriterStreamProfileWriterTokenInitializerRoamingCredentialWriterUser user = new User(); JNDIDirectory directory = new JNDIDirectory(DIRECTORY_IP, DIRECTORY_PORT); ManagerTransport transport = new ManagerTransport(MANAGER_IP, MANAGER_PORT); user.setConnections(directory, transport); SecureStringBuffer securePassword = new SecureStringBuffer(PASSWORD); CredentialReader credentialReader = new FilenameProfileReader(EPF_FILE_NAME); CredentialWriter credentialWriter = new FilenameProfileWriter(EPF_FILE_NAME); user.setCredentialWriter(credentialWriter); user.login(credentialReader, securePassword);
FilenameProfileReader
object could result in stale information being read. This WILL happen
if the Digital Identity is written (by the Toolkit or some other
product) after the FilenameProfileReader instance was
created, and then a subsequent read is attempted. Thus, it is best to
only use this credential reader for a single read operation; subsequent
reads should be done using separate instances.| Constructor and Description |
|---|
FilenameProfileReader(java.lang.String filename)
Creates a
FilenameProfileReader object. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Returns the type (name) of this specific credential reader, which is
"FilenameProfileReader".
|
checkPwdpublic FilenameProfileReader(java.lang.String filename)
throws java.io.FileNotFoundException
FilenameProfileReader object.
When the user logs in, all Digital Identity information read from the indicated EPF file.
filename - the name of the EPF file that contains the user's Digital Identity
(usually has a .epf filename extension)java.lang.IllegalArgumentException - thrown if filename is nulljava.io.FileNotFoundException - thrown if the indicated EPF file could not be locatedpublic java.lang.String getType()
getType in class CredentialReader