getLogger().info( "... {} authentication setup for NTLM domain '{}'", authScope, nras.getNtlmDomain() ); credentials = new NTCredentials( nras.getUsername(), nras.getPassword(), nras.getNtlmHost(), nras.getNtlmDomain() );
/** * Externalized Nexus object to DTO's conversion. */ public static AuthenticationSettings convert(RemoteAuthenticationSettings settings) { if (settings == null) { return null; } AuthenticationSettings auth = new AuthenticationSettings(); if (settings instanceof ClientSSLRemoteAuthenticationSettings) { // huh? } else if (settings instanceof NtlmRemoteAuthenticationSettings) { NtlmRemoteAuthenticationSettings up = (NtlmRemoteAuthenticationSettings) settings; auth.setUsername(up.getUsername()); auth.setPassword(PASSWORD_PLACE_HOLDER); auth.setNtlmHost(up.getNtlmHost()); auth.setNtlmDomain(up.getNtlmDomain()); } else if (settings instanceof UsernamePasswordRemoteAuthenticationSettings) { UsernamePasswordRemoteAuthenticationSettings up = (UsernamePasswordRemoteAuthenticationSettings) settings; auth.setUsername(up.getUsername()); auth.setPassword(PASSWORD_PLACE_HOLDER); } return auth; }
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; } }
auth.setUsername( up.getUsername() ); auth.setNtlmHost( up.getNtlmHost() ); auth.setNtlmDomain( up.getNtlmDomain() );
remoteAuthentication.setUsername( up.getUsername() ); remoteAuthentication.setPassword( up.getPassword() ); remoteAuthentication.setNtlmDomain( up.getNtlmDomain() ); remoteAuthentication.setNtlmHost( up.getNtlmHost() );
logger( logger ).info( "... authentication setup for NTLM domain '{}'", nras.getNtlmDomain() ); httpConfiguration.setHost( nras.getNtlmHost() ); new NTCredentials( nras.getUsername(), nras.getPassword(), nras.getNtlmHost(), nras.getNtlmDomain() ) ); logger( logger ).info( "... proxy authentication setup for NTLM domain '{}'", nras.getNtlmDomain() ); httpConfiguration.setHost( nras.getNtlmHost() ); new NTCredentials( nras.getUsername(), nras.getPassword(), nras.getNtlmHost(), nras.getNtlmDomain() ) );
new Realm.RealmBuilder().setPrincipal( nras.getUsername() ).setPassword( nras.getPassword() ).setNtlmDomain( nras.getNtlmDomain() ).setNtlmHost( nras.getNtlmHost() ).build(); proxy = new ProxyServer( rps.getHostname(), rps.getPort(), nras.getUsername(), nras.getPassword() ); proxy.setNtlmDomain( nras.getNtlmDomain() );