public RemoteAuthenticationSettings getProxyAuthentication() { if ( isEnabled() ) { try { return authenticationInfoConverter.convertAndValidateFromModel( getCurrentConfiguration( false ) .getAuthentication() ); } catch ( ConfigurationException e ) { // FIXME: what here?? setProxyAuthentication( null ); return null; } } return null; }
public RemoteProxySettings convertAndValidateFromModel( CRemoteHttpProxySettings model ) throws ConfigurationException { ( (CGlobalHttpProxySettingsCoreConfiguration) getCurrentCoreConfiguration() ).doValidateChanges( model ); if ( model != null ) { RemoteProxySettings remoteProxySettings = new DefaultRemoteProxySettings(); remoteProxySettings.setBlockInheritance( model.isBlockInheritance() ); if ( remoteProxySettings.isBlockInheritance() ) { return remoteProxySettings; } remoteProxySettings.setHostname( model.getProxyHostname() ); remoteProxySettings.setPort( model.getProxyPort() ); remoteProxySettings.setProxyAuthentication( authenticationInfoConverter.convertAndValidateFromModel( model .getAuthentication() ) ); remoteProxySettings.setNonProxyHosts( new HashSet<String>( model.getNonProxyHosts() ) ); return remoteProxySettings; } else { return null; } }
public RemoteHttpProxySettings convert(final RemoteHttpProxySettingsDTO settings, final String oldPassword) throws ConfigurationException { if (settings == null || StringUtils.isEmpty(settings.getProxyHostname())) { return null; } final RemoteHttpProxySettings result = new DefaultRemoteHttpProxySettings(); result.setHostname(settings.getProxyHostname()); result.setPort(settings.getProxyPort()); if (settings.getAuthentication() != null) { CRemoteAuthentication auth = new CRemoteAuthentication(); auth.setUsername(settings.getAuthentication().getUsername()); auth.setPassword(getActualPassword(settings.getAuthentication().getPassword(), oldPassword)); auth.setNtlmDomain(settings.getAuthentication().getNtlmDomain()); auth.setNtlmHost(settings.getAuthentication().getNtlmHost()); result.setProxyAuthentication( getAuthenticationInfoConverter().convertAndValidateFromModel(auth)); } else { result.setProxyAuthentication(null); } return result; }
getAuthenticationInfoConverter().convertAndValidateFromModel( this.convertAuthentication(model.getRemoteStorage().getAuthentication(), oldPasswordForRemoteStorage));
getAuthenticationInfoConverter().convertAndValidateFromModel( auth ) );
getAuthenticationInfoConverter().convertAndValidateFromModel( this.convertAuthentication( model.getRemoteStorage().getAuthentication(), oldPasswordForRemoteStorage ) );
prepository.setRemoteAuthenticationSettings( authenticationInfoConverter.convertAndValidateFromModel( repo.getRemoteStorage().getAuthentication() ) );