public final class StreamProfileReader 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:
FilenameProfileWriterPKCS12WriterStreamProfileWriterTokenInitializerUser 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 StreamProfileReader(EPF_INPUT_STREAM); CredentialWriter credentialWriter = new StreamProfileWriter(EPF_OUTPUT_STREAM); user.setCredentialWriter(credentialWriter); user.login(credentialReader, securePassword);
StreamProfileReader
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 StreamProfileReader 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 |
|---|
StreamProfileReader(java.io.InputStream inputStream)
A constructor; creates a new
StreamProfileReader from the
provide provided values. |
StreamProfileReader(java.io.InputStream inputStream,
java.lang.String entrustPath,
java.lang.String entrustUser)
A constructor; creates a new
StreamProfileReader from the
provided values. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Returns the type (name) of this specific credential reader, which is
"StreamProfileReader".
|
checkPwdpublic StreamProfileReader(java.io.InputStream inputStream)
StreamProfileReader from the
provide provided values.
When the user logs in, all Digital Identity information read from the indicated input stream in EPF format.
StreamProfileReader and
StreamProfileWriter objects to read and write to
the Digital Identity stores managed by instances of the
FileInputStream and FileOutputStream
classes, ensure that you read from, and write to, files with
different file names to prevent the destruction of the
Digital Identity file when you open the output streamInputStream once the
Digital Identity store has been read; it is up to the caller to do
so if necessaryinputStream - the input stream that contains the user's Digital Identity store in EPF
formatjava.lang.IllegalArgumentException - thrown if any of the required parameters are nullpublic StreamProfileReader(java.io.InputStream inputStream,
java.lang.String entrustPath,
java.lang.String entrustUser)
StreamProfileReader from the
provided values.
When the user logs in, all Digital Identity information read from the indicated input stream in EPF format.
The Entrust path and Entrust user values are used to identity files related to an Entrust digital identity (i.e. .epf, .xcc ...). If the Entrust path value is not provided, the current folder is used instead. If the Entrust user value is not provided, then none of the files that accompany the digital identity can be automatically read during login.
StreamProfileReader and
StreamProfileWriter objects to read and write to the Digital
Identity stores managed by instances of the FileInputStream
and FileOutputStream classes, ensure that you read from, and
write to, files with different file names to prevent the destruction of
the Digital Identity file when you open the output streamInputStream once the
Digital Identity store has been read; it is up to the caller to do so if
necessaryinputStream - an input stream from which the Entrust profile format Digital
Identity can be readentrustPath - the Entrust path value; identifies the folder in which files
related to this digital identity are stored (i.e. .epf, .xcc
...) [OPTIONAL]entrustUser - the Entrust user value; contains the name of the digital
identity. Files related to this digital identity are
identified with this name (i.e. <Entrust User>.epf,
<Entrust User>.xcc ...) [OPTIONAL]public java.lang.String getType()
getType in class CredentialReader