org.eclipse.aether.util.repository.DefaultAuthenticationSelector Java Examples

The following examples show how to use org.eclipse.aether.util.repository.DefaultAuthenticationSelector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MavenSettings.java    From spring-init with Apache License 2.0 5 votes vote down vote up
private AuthenticationSelector createAuthenticationSelector(
		SettingsDecryptionResult decryptedSettings) {
	DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
	for (Server server : decryptedSettings.getServers()) {
		AuthenticationBuilder auth = new AuthenticationBuilder();
		auth.addUsername(server.getUsername()).addPassword(server.getPassword());
		auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
		selector.add(server.getId(), auth.build());
	}
	return new ConservativeAuthenticationSelector(selector);
}
 
Example #2
Source File: MavenSettings.java    From spring-cloud-function with Apache License 2.0 5 votes vote down vote up
private AuthenticationSelector createAuthenticationSelector(
		SettingsDecryptionResult decryptedSettings) {
	DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
	for (Server server : decryptedSettings.getServers()) {
		AuthenticationBuilder auth = new AuthenticationBuilder();
		auth.addUsername(server.getUsername()).addPassword(server.getPassword());
		auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
		selector.add(server.getId(), auth.build());
	}
	return new ConservativeAuthenticationSelector(selector);
}
 
Example #3
Source File: LazyAuthenticationSelector.java    From furnace with Eclipse Public License 1.0 4 votes vote down vote up
LazyAuthenticationSelector(MirrorSelector mirrorSelector)
{
   this.mirrorSelector = mirrorSelector;
   this.defaultAuthSelector = new DefaultAuthenticationSelector();
}
 
Example #4
Source File: LazyAuthenticationSelector.java    From furnace with Eclipse Public License 1.0 4 votes vote down vote up
LazyAuthenticationSelector(DefaultMirrorSelector mirrorSelector)
{
   this.mirrorSelector = mirrorSelector;
   this.defaultAuthSelector = new DefaultAuthenticationSelector();
}