public RemoteAuthenticationSettings convertAndValidateFromModel( CRemoteAuthentication model ) throws ConfigurationException { if ( model != null ) { doValidate( model ); if ( StringUtils.isNotBlank( model.getKeyStore() ) || StringUtils.isNotBlank( model.getTrustStore() ) ) { return new ClientSSLRemoteAuthenticationSettings( new File( model.getTrustStore() ), model .getTrustStorePassword(), new File( model.getKeyStore() ), model.getKeyStorePassword() ); } else if ( StringUtils.isNotBlank( model.getNtlmDomain() ) ) { return new NtlmRemoteAuthenticationSettings( model.getUsername(), model.getPassword(), model .getNtlmDomain(), model.getNtlmHost() ); } else { return new UsernamePasswordRemoteAuthenticationSettings( model.getUsername(), model.getPassword() ); } } else { return null; } }
&& StringUtils.isNotEmpty( config.getGlobalHttpProxySettings().getAuthentication().getPassword() ) ) auth.setPassword( encryptDecryptPassword( auth.getPassword(), encrypt, mask ) ); && StringUtils.isNotEmpty( repo.getRemoteStorage().getAuthentication().getPassword() ) ) auth.setPassword( encryptDecryptPassword( auth.getPassword(), encrypt, mask ) ); && repo.getRemoteStorage().getHttpProxySettings() != null && repo.getRemoteStorage().getHttpProxySettings().getAuthentication() != null && StringUtils.isNotEmpty( repo.getRemoteStorage().getHttpProxySettings().getAuthentication().getPassword() ) ) auth.setPassword( encryptDecryptPassword( auth.getPassword(), encrypt, mask ) );
if ( cRemoteAuthentication.getPassword() != null ) serializer.startTag( NAMESPACE, "password" ).text( cRemoteAuthentication.getPassword() ).endTag( NAMESPACE, "password" );