Search in sources :

Example 1 with Realm

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;
}
Also used : Authentication(org.sonatype.aether.repository.Authentication) Realm(com.ning.http.client.Realm)

Aggregations

Realm (com.ning.http.client.Realm)1 Authentication (org.sonatype.aether.repository.Authentication)1