X500Principal for the subject distinguished name of the
first certificate in the alias's credentials in the subject's principals,
the alias's certificate path in the subject's public credentials, and a
X500PrivateCredential whose certificate is the first
certificate in the alias's certificate path and whose private key is the
alias's private key in the subject's private credentials. Recognizes the following options in the configuration file:
keyStoreURL user.home system property. The input stream from this
URL is passed to the KeyStore.load method.
"NONE" may be specified if a null stream must be
passed to the KeyStore.load method.
"NONE" should be specified if the KeyStore resides
on a hardware token device, for example.keyStoreType KeyStore.getDefaultType().
If the type is "PKCS11", then keyStoreURL must be "NONE"
and privateKeyPasswordURL must not be specified.keyStoreProvider keyStoreAlias keyStorePasswordURL protected is false.
No default value. privateKeyPasswordURL protected | Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final TextOutputCallback | |
| private CallbackHandler | |
| private CertPath | |
| private final ConfirmationCallback | |
| private boolean | |
| private Certificate[] | |
| private static final int | |
| private KeyStore | |
| private String | |
| private char[] | |
| private String | |
| private String | |
| private String | |
| private String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private boolean | |
| private Map | |
| private static final String | |
| private X500Principal | |
| private X500PrivateCredential | |
| private char[] | |
| private String | |
| private static final int | |
| private boolean | |
| private Map | |
| private int | |
| private Subject | |
| private static final int | |
| private boolean | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: false if this LoginModule's own login and/or commit attempts failed, and true otherwise.Implements javax. This method is called if the LoginContext's overall authentication failed. |
| private void | |
| private void | |
| private void | |
| public boolean | Returns: true if this LoginModule's own login and commit attempts succeeded, or false otherwise.Implements javax. Abstract method to commit the authentication process (phase 2). |
| private boolean | |
| private void | |
| private void | |
| private void | |
| public void | initialize(Subject
the subject, CallbackHandler Subject to be authenticated.a callbackHandler, Map<String, ?> CallbackHandler for communicating
with the end user (prompting for usernames and
passwords, for example),
which may be null.shared sharedState, Map<String, ?> LoginModule state.options specified in the login
options)Configuration for this particular
LoginModule.Implements javax. Initialize this |
| public boolean | Returns: true in all cases (thisLoginModule
should not be ignored).Implements javax. Authenticate the user. |
| public boolean | Returns: true in all cases since thisLoginModule
should not be ignored.Implements javax. Logout a user. |
| private void | |
| private static URL | |
| private void | |
| private void | prompt(NameCallback aliasCallback, PasswordCallback storePassCallback, PasswordCallback keyPassCallback)
|
| private void | |
| private void | |
| private void |
| AUTHENTICATED | back to summary |
|---|---|
| private static final int AUTHENTICATED | |
| bannerCallback | back to summary |
|---|---|
| private static final TextOutputCallback bannerCallback | |
| callbackHandler | back to summary |
|---|---|
| private CallbackHandler callbackHandler | |
| certP | back to summary |
|---|---|
| private CertPath certP | |
| confirmationCallback | back to summary |
|---|---|
| private final ConfirmationCallback confirmationCallback | |
| debug | back to summary |
|---|---|
| private boolean debug | |
| fromKeyStore | back to summary |
|---|---|
| private Certificate[] fromKeyStore | |
| INITIALIZED | back to summary |
|---|---|
| private static final int INITIALIZED | |
| keyStore | back to summary |
|---|---|
| private KeyStore keyStore | |
| keyStoreAlias | back to summary |
|---|---|
| private String keyStoreAlias | |
| keyStorePassword | back to summary |
|---|---|
| private char[] keyStorePassword | |
| keyStorePasswordURL | back to summary |
|---|---|
| private String keyStorePasswordURL | |
| keyStoreProvider | back to summary |
|---|---|
| private String keyStoreProvider | |
| keyStoreType | back to summary |
|---|---|
| private String keyStoreType | |
| keyStoreURL | back to summary |
|---|---|
| private String keyStoreURL | |
| LOGGED_IN | back to summary |
|---|---|
| private static final int LOGGED_IN | |
| NONE | back to summary |
|---|---|
| private static final String NONE | |
| NORMAL | back to summary |
|---|---|
| private static final int NORMAL | |
| nullStream | back to summary |
|---|---|
| private boolean nullStream | |
| options | back to summary |
|---|---|
| private Map<String, ?> options | |
| P11KEYSTORE | back to summary |
|---|---|
| private static final String P11KEYSTORE | |
| principal | back to summary |
|---|---|
| private X500Principal principal | |
| privateCredential | back to summary |
|---|---|
| private X500PrivateCredential privateCredential | |
| privateKeyPassword | back to summary |
|---|---|
| private char[] privateKeyPassword | |
| privateKeyPasswordURL | back to summary |
|---|---|
| private String privateKeyPasswordURL | |
| PROTECTED_PATH | back to summary |
|---|---|
| private static final int PROTECTED_PATH | |
| protectedPath | back to summary |
|---|---|
| private boolean protectedPath | |
| sharedState | back to summary |
|---|---|
| private Map<String, Object> sharedState | |
| status | back to summary |
|---|---|
| private int status | |
| subject | back to summary |
|---|---|
| private Subject subject | |
| TOKEN | back to summary |
|---|---|
| private static final int TOKEN | |
| token | back to summary |
|---|---|
| private boolean token | |
| UNINITIALIZED | back to summary |
|---|---|
| private static final int UNINITIALIZED | |
| KeyStoreLoginModule | back to summary |
|---|---|
| public KeyStoreLoginModule() Creates a | |
| abort | back to summary |
|---|---|
| public boolean abort() throws LoginException Implements javax. This method is called if the LoginContext's overall authentication failed. (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed). If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
If the loaded KeyStore's provider extends
| |
| checkAlias | back to summary |
|---|---|
| private void checkAlias() throws LoginException | |
| checkKeyPass | back to summary |
|---|---|
| private void checkKeyPass() throws LoginException | |
| checkStorePass | back to summary |
|---|---|
| private void checkStorePass() throws LoginException | |
| commit | back to summary |
|---|---|
| public boolean commit() throws LoginException Implements javax. Abstract method to commit the authentication process (phase 2). This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded). If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
| |
| commitInternal | back to summary |
|---|---|
| private boolean commitInternal() throws LoginException | |
| debugPrint | back to summary |
|---|---|
| private void debugPrint(String message) | |
| getAliasAndPasswords | back to summary |
|---|---|
| private void getAliasAndPasswords(int env) throws LoginException Get the alias and passwords to use for looking up in the KeyStore.
| |
| getKeyStoreInfo | back to summary |
|---|---|
| private void getKeyStoreInfo() throws LoginException Get the credentials from the KeyStore. | |
| initialize | back to summary |
|---|---|
| public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) Implements javax. Initialize this
| |
| login | back to summary |
|---|---|
| public boolean login() throws LoginException Implements javax. Authenticate the user. Get the Keystore alias and relevant passwords. Retrieve the alias's principal and credentials from the Keystore.
| |
| logout | back to summary |
|---|---|
| public boolean logout() throws LoginException Implements javax. Logout a user. This method removes the Principals, public credentials and the
private credentials that were added by the If the loaded KeyStore's provider extends
| |
| logoutInternal | back to summary |
|---|---|
| private void logoutInternal() throws LoginException | |
| newURL | back to summary |
|---|---|
private static URL newURL(String spec) throws MalformedURLException
| |
| processOptions | back to summary |
|---|---|
| private void processOptions() | |
| prompt | back to summary |
|---|---|
| private void prompt(NameCallback aliasCallback, PasswordCallback storePassCallback, PasswordCallback keyPassCallback) throws LoginException | |
| saveAlias | back to summary |
|---|---|
| private void saveAlias(NameCallback cb) | |
| saveKeyPass | back to summary |
|---|---|
| private void saveKeyPass(PasswordCallback c) | |
| saveStorePass | back to summary |
|---|---|
| private void saveStorePass(PasswordCallback c) | |