forked from yasserg/crawler4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for NT authentication to support crawling sites protect…
…ed by active directory
- Loading branch information
Showing
4 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
target/ | ||
.DS_STORE | ||
.idea/* | ||
*.iml | ||
.settings/* | ||
javadocs/* | ||
.classpath | ||
.project | ||
.project | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/edu/uci/ics/crawler4j/crawler/authentication/NtAuthInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package edu.uci.ics.crawler4j.crawler.authentication; | ||
|
||
import javax.swing.text.html.FormSubmitEvent.MethodType; | ||
import java.net.MalformedURLException; | ||
|
||
/** | ||
* Authentication information for Microsoft Active Directory | ||
*/ | ||
public class NtAuthInfo extends AuthInfo { | ||
private String domain; | ||
|
||
public NtAuthInfo(String username, String password, String loginUrl, String domain) throws MalformedURLException { | ||
super(AuthenticationType.NT_AUTHENTICATION, MethodType.GET, loginUrl, username, password); | ||
this.domain = domain; | ||
} | ||
|
||
public String getDomain() { | ||
return domain; | ||
} | ||
|
||
public void setDomain(String domain) { | ||
this.domain = domain; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters