You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a mechanism to allow users to add credentials. Added in 1.4.0.
/** * Sets basic authentication for the request. Uses AuthScope.ANY. This is the same as * setBasicAuth('username','password',AuthScope.ANY) * @param username * @param password */publicvoidsetBasicAuth(Stringuser, Stringpass){
AuthScopescope = AuthScope.ANY;
setBasicAuth(user, pass, scope);
}
/** * Sets basic authentication for the request. You should pass in your AuthScope for security. It should be like this * setBasicAuth("username","password", new AuthScope("host",port,AuthScope.ANY_REALM)) * @param username * @param password * @param scope - an AuthScope object * */publicvoidsetBasicAuth( Stringuser, Stringpass, AuthScopescope){
UsernamePasswordCredentialscredentials = newUsernamePasswordCredentials(user,pass);
this.httpClient.getCredentialsProvider().setCredentials(scope, credentials);
}
Since the library provides convenience methods to add credentials I believe there should be a mechanism to easily remove them as well.
The text was updated successfully, but these errors were encountered:
There is a mechanism to allow users to add credentials. Added in 1.4.0.
Since the library provides convenience methods to add credentials I believe there should be a mechanism to easily remove them as well.
The text was updated successfully, but these errors were encountered: