use of com.ning.http.client.Realm in project sonatype-aether by sonatype.
the class AsyncRepositoryConnector method getRealm.
private Realm getRealm(RemoteRepository repository, String credentialEncoding) {
Realm realm = null;
Authentication a = repository.getAuthentication();
if (a != null && a.getUsername() != null) {
realm = new Realm.RealmBuilder().setPrincipal(a.getUsername()).setPassword(a.getPassword()).setUsePreemptiveAuth(false).setEnconding(credentialEncoding).build();
}
return realm;
}
Aggregations