/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType) throws CredentialStoreException { remove(credentialAlias, credentialType, null, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @param credentialAlgorithm the algorithm name to match, or {@code null} to match any * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType, String credentialAlgorithm) throws CredentialStoreException { remove(credentialAlias, credentialType, credentialAlgorithm, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @param credentialAlgorithm the algorithm name to match, or {@code null} to match any * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType, String credentialAlgorithm) throws CredentialStoreException { remove(credentialAlias, credentialType, credentialAlgorithm, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType) throws CredentialStoreException { remove(credentialAlias, credentialType, null, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @param credentialAlgorithm the algorithm name to match, or {@code null} to match any * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType, String credentialAlgorithm) throws CredentialStoreException { remove(credentialAlias, credentialType, credentialAlgorithm, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType) throws CredentialStoreException { remove(credentialAlias, credentialType, null, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType) throws CredentialStoreException { remove(credentialAlias, credentialType, null, null); }
/** * Remove the credentialType with from given alias matching the given criteria from the store. * * @param credentialAlias alias to remove credential(s) from * @param credentialType credential type to match (must not be {@code null}) * @param credentialAlgorithm the algorithm name to match, or {@code null} to match any * @throws CredentialStoreException if credential removal fails */ public void remove(String credentialAlias, Class<? extends Credential> credentialType, String credentialAlgorithm) throws CredentialStoreException { remove(credentialAlias, credentialType, credentialAlgorithm, null); }
private static void storeSecret(CredentialStore credentialStore, String alias, String secretValue) throws CredentialStoreException { char[] secret = secretValue != null ? secretValue.toCharArray() : new char[0]; credentialStore.store(alias, createCredentialFromPassword(secret)); try { credentialStore.flush(); } catch (CredentialStoreException e) { // operation fails, remove the entry from the store, to avoid an inconsistency between // the store on the FS and in the memory credentialStore.remove(alias, PasswordCredential.class); throw e; } }
throw ROOT_LOGGER.credentialDoesNotExist(alias, PasswordCredential.class.getName()); credentialStore.remove(alias, PasswordCredential.class); context.addResponseWarning(Level.WARNING, ROOT_LOGGER.updateDependantServices(alias)); try {