/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
private CredentialStore.CredentialSourceProtectionParameter credentialToCredentialSourceProtectionParameter(Credential credential) { return new CredentialStore.CredentialSourceProtectionParameter(IdentityCredentials.NONE.withCredential(credential)); }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }