protected void inspect(final Event<?> evt) { // FIXME: Sort out what to do with http/https here RemoteHttpProxySettings httpProxySettings = globalRemoteProxySettings.getHttpProxySettings(); if (httpProxySettings != null && httpProxySettings.isEnabled()) { String username = null; String password = null; final RemoteAuthenticationSettings authentication = httpProxySettings.getProxyAuthentication(); if (authentication != null && UsernamePasswordRemoteAuthenticationSettings.class.isAssignableFrom(authentication.getClass())) { username = ((UsernamePasswordRemoteAuthenticationSettings) authentication).getUsername(); password = ((UsernamePasswordRemoteAuthenticationSettings) authentication).getPassword(); } final String hostname = httpProxySettings.getHostname(); final int port = httpProxySettings.getPort(); final Set<String> nonProxyHosts = globalRemoteProxySettings.getNonProxyHosts(); log.debug( "Configure P2 proxy using global http proxy settings: hostname={}, port={}, username={}, nonProxyHosts={}", hostname, port, username, nonProxyHosts ); httpProxy.setProxySettings(hostname, port, username, password, nonProxyHosts); } else { log.debug("No global http proxy settings. Resetting P2 proxy."); httpProxy.setProxySettings(null, -1, null, null, null); } }
getLogger().info( "... {} authentication setup for remote storage with username '{}'", authScope, uras.getUsername() ); credentials = new UsernamePasswordCredentials( uras.getUsername(), uras.getPassword() );
password = ( (UsernamePasswordRemoteAuthenticationSettings) authentication ).getPassword();
(UsernamePasswordRemoteAuthenticationSettings) remoteAuthenticationSettings; username = upras.getUsername(); password = upras.getPassword();
(UsernamePasswordRemoteAuthenticationSettings) remoteAuthenticationSettings; username = upras.getUsername(); password = upras.getPassword();
oldHttpProxyPassword = ((UsernamePasswordRemoteAuthenticationSettings) remoteProxySettingsConfiguration.getHttpProxySettings() .getProxyAuthentication()).getPassword(); oldHttpsProxyPassword = ((UsernamePasswordRemoteAuthenticationSettings) remoteProxySettingsConfiguration.getHttpsProxySettings() .getProxyAuthentication()).getPassword();
new UsernamePasswordCredentials( uras.getUsername(), uras.getPassword() ) ); new UsernamePasswordCredentials( uras.getUsername(), uras.getPassword() ) );
remoteAuthentication.setPassword( up.getPassword() );
oldPasswordForRemoteStorage = ((UsernamePasswordRemoteAuthenticationSettings) proxyRepo .getRemoteAuthenticationSettings()).getPassword();
new Realm.RealmBuilder().setPrincipal( uras.getUsername() ).setPassword( uras.getPassword() ).setUsePreemptiveAuth( true ).build(); (UsernamePasswordRemoteAuthenticationSettings) ras; proxy = new ProxyServer( rps.getHostname(), rps.getPort(), uras.getUsername(), uras.getPassword() );
( (UsernamePasswordRemoteAuthenticationSettings) getGlobalHttpProxySettings().getProxyAuthentication() ).getPassword();
.getRemoteAuthenticationSettings() ).getPassword(); .getProxyAuthentication() ).getPassword();