* @param urlkey
* @return {@link AuthToken} representing user's privileges on {@code urlkey}.
*/
protected AuthToken createAuthToken(WaybackRequest wbRequest, String urlkey)
{
AuthToken waybackAuthToken = new APContextAuthToken(wbRequest.getAccessPoint());
waybackAuthToken.setAllCdxFieldsAllow();
boolean ignoreRobots = wbRequest.isCSSContext() || wbRequest.isIMGContext() || wbRequest.isJSContext();
if (ignoreRobots) {
waybackAuthToken.setIgnoreRobots(true);
}
if (ignoreRobotPaths != null) {
for (String path : ignoreRobotPaths) {
if (urlkey.startsWith(path)) {
waybackAuthToken.setIgnoreRobots(true);
break;
}
}
}