public final class KeychainCredentialReader extends CredentialReader
CredentialReader for reading a Digital Identity from a
Keychain. This class can be created in one of two ways, either by providing
an array of handles to Keychain certificates, or by providing a
KeychainIdentity object. The method using the
KeychainIdentity object is the preferred way, the array of
certificate handles is for specialized uses for when the set of certificates
chosen by the KeychainIdentity is not appropriate.
No CredentialWriter object can be used in conjunction with a
KeychainCredentialReader; a Digital Identity read from the Keychain is
strictly read-only.
When calling User.login() with a KeychainCredentialReader,
supply null as the password. With Keychain, the key protection mechanism
may not be password based, and is up to the Keychain to enforce.
KeychainIdentity,
KeychainIdentities| Constructor and Description |
|---|
KeychainCredentialReader(KeychainIdentity identity)
Create a
KeychainCredentialReader that reads certificates
and keys for the given KeychainIdentity. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Returns the type (name) of this
CredentialReader. |
checkPwdpublic KeychainCredentialReader(KeychainIdentity identity)
KeychainCredentialReader that reads certificates
and keys for the given KeychainIdentity. The identity should
be created by calling KeychainIdentities.findIdentities(),
then selecting the appropriate identity from the returned list.identity - The identity to read keys and certificates for.public java.lang.String getType()
CredentialReader.getType in class CredentialReaderCredentialReader