/** * Set the authentication username and password used for HTTP Basic, HTTP Digest, * or SPNEGO authentication. * * @param username The username * @param password The password */ @PublicAtsApi public void setAuthorization( String username, String password ) { if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password)) { this.username = username; this.password = password; invalidateInternalClient(); } }
/** * Set the authentication username and password used for HTTP Basic, HTTP Digest, * or SPNEGO authentication. * * @param username The username * @param password The password * @param authType Set to 'always' if the HTTP Basic Authorization header should * be sent preemptively, i.e. without waiting for the server challenge. */ @PublicAtsApi public void setAuthorization( String username, String password, AuthType authType ) { if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password) || this.authType != authType) { this.username = username; this.password = password; this.authType = authType; invalidateInternalClient(); } }