Skip to content

Commit

Permalink
replace with AUTHENTICATIONS_PROPERTY
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed May 9, 2024
1 parent 9e7f9fe commit d5cbac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class HcHttpClient extends AbstractCrawlerClient {

public static final String ROBOTS_TXT_ENABLED_PROPERTY = "robotsTxtEnabled";

public static final String BASIC_AUTHENTICATIONS_PROPERTY = "basicAuthentications";
public static final String AUTHENTICATIONS_PROPERTY = "webAuthentications";

public static final String REQUERT_HEADERS_PROPERTY = "requestHeaders";

Expand All @@ -162,6 +162,9 @@ public class HcHttpClient extends AbstractCrawlerClient {

public static final String TIME_TO_LIVE_PROPERTY = "timeToLive";

@Deprecated
public static final String BASIC_AUTHENTICATIONS_PROPERTY = AUTHENTICATIONS_PROPERTY;

private static final Logger logger = LoggerFactory.getLogger(HcHttpClient.class);

@Resource
Expand Down Expand Up @@ -298,7 +301,7 @@ public synchronized void init() {

// Authentication
final Authentication[] siteCredentialList =
getInitParameter(BASIC_AUTHENTICATIONS_PROPERTY, new Authentication[0], Authentication[].class);
getInitParameter(AUTHENTICATIONS_PROPERTY, new Authentication[0], Authentication[].class);
final List<Pair<FormScheme, Credentials>> formSchemeList = new ArrayList<>();
for (final Authentication authentication : siteCredentialList) {
final AuthScheme authScheme = authentication.getAuthScheme();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void test_buildRedirectLocation() throws Exception {
// new UsernamePasswordCredentials("username", "password"),
// digestScheme));
// paramMap.put(
// HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY,
// HcHttpClient.AUTHENTICATIONS_PROPERTY,
// basicAuthList.toArray(new Authentication[basicAuthList.size()]));
//
// List<Callable<ResponseData>> list =
Expand Down

0 comments on commit d5cbac4

Please sign in to comment.