use of org.apache.http.impl.auth.BasicSchemeFactory in project robovm by robovm.
the class DefaultHttpClient method createAuthSchemeRegistry.
@Override
protected AuthSchemeRegistry createAuthSchemeRegistry() {
AuthSchemeRegistry registry = new AuthSchemeRegistry();
registry.register(AuthPolicy.BASIC, new BasicSchemeFactory());
registry.register(AuthPolicy.DIGEST, new DigestSchemeFactory());
return registry;
}
use of org.apache.http.impl.auth.BasicSchemeFactory in project platform_external_apache-http by android.
the class DefaultHttpClient method createAuthSchemeRegistry.
@Override
protected AuthSchemeRegistry createAuthSchemeRegistry() {
AuthSchemeRegistry registry = new AuthSchemeRegistry();
registry.register(AuthPolicy.BASIC, new BasicSchemeFactory());
registry.register(AuthPolicy.DIGEST, new DigestSchemeFactory());
return registry;
}
use of org.apache.http.impl.auth.BasicSchemeFactory in project apex-core by apache.
the class WebServicesClient method initAuth.
public static void initAuth(ConfigProvider configuration) {
// Setting up BASIC and DIGEST auth
setupUserPassAuthScheme(AuthScheme.BASIC, AuthSchemes.BASIC, new BasicSchemeFactory(), configuration);
setupUserPassAuthScheme(AuthScheme.DIGEST, AuthSchemes.DIGEST, new DigestSchemeFactory(), configuration);
// Adding kerberos standard auth
setupHttpAuthScheme(AuthSchemes.KERBEROS, new KerberosSchemeFactory(), AuthScope.ANY, DEFAULT_TOKEN_CREDENTIALS);
authRegistry = registryBuilder.build();
}
use of org.apache.http.impl.auth.BasicSchemeFactory in project XobotOS by xamarin.
the class DefaultHttpClient method createAuthSchemeRegistry.
@Override
protected AuthSchemeRegistry createAuthSchemeRegistry() {
AuthSchemeRegistry registry = new AuthSchemeRegistry();
registry.register(AuthPolicy.BASIC, new BasicSchemeFactory());
registry.register(AuthPolicy.DIGEST, new DigestSchemeFactory());
return registry;
}
use of org.apache.http.impl.auth.BasicSchemeFactory in project calcite-avatica by apache.
the class AvaticaCommonsHttpClientImpl method setUsernamePassword.
@Override
public void setUsernamePassword(AuthenticationType authType, String username, String password) {
this.credentials = new UsernamePasswordCredentials(Objects.requireNonNull(username), Objects.requireNonNull(password));
this.credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, credentials);
RegistryBuilder<AuthSchemeProvider> authRegistryBuilder = RegistryBuilder.create();
switch(authType) {
case BASIC:
authRegistryBuilder.register(AuthSchemes.BASIC, new BasicSchemeFactory());
break;
case DIGEST:
authRegistryBuilder.register(AuthSchemes.DIGEST, new DigestSchemeFactory());
break;
default:
throw new IllegalArgumentException("Unsupported authentiation type: " + authType);
}
this.authRegistry = authRegistryBuilder.build();
}
Aggregations