You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by kamaci <gi...@git.apache.org> on 2016/06/26 14:48:30 UTC

[GitHub] nutch pull request #126: NUTCH-2285 Digest Authentication support for Nutch ...

GitHub user kamaci opened a pull request:

    https://github.com/apache/nutch/pull/126

    NUTCH-2285 Digest Authentication support for Nutch 2.X REST API.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kamaci/nutch NUTCH-2285

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nutch/pull/126.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #126
    
----
commit 52ffc5a983f261570fd25f10f2f8fcf70d543c88
Author: Furkan KAMACI <fu...@gmail.com>
Date:   2016-06-19T20:27:15Z

    NUTCH-2284 Basic Authentication support for Nutch 2.X REST API.

commit e147b43ac0551548acff14576e2156e3b5f7e9fa
Author: Furkan KAMACI <fu...@gmail.com>
Date:   2016-06-26T14:45:46Z

    NUTCH-2285 Digest Authentication support for Nutch 2.X REST API.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request #126: NUTCH-2285 Digest Authentication support for Nutch ...

Posted by kamaci <gi...@git.apache.org>.
Github user kamaci closed the pull request at:

    https://github.com/apache/nutch/pull/126


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request #126: NUTCH-2285 Digest Authentication support for Nutch ...

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/126#discussion_r68630240
  
    --- Diff: src/java/org/apache/nutch/api/NutchServer.java ---
    @@ -108,8 +118,41 @@ public NutchServer() {
         application.setStatusService(new ErrorStatusService());
         childContext.getAttributes().put(NUTCH_SERVER, this);
     
    -    // Attach the application.
    -    component.getDefaultHost().attach(application);
    +    AuthenticationTypeEnum authenticationType = configManager.get(ConfigResource.DEFAULT)
    +            .getEnum("restapi.auth", AuthenticationTypeEnum.NONE);
    +
    +    if (authenticationType == AuthenticationTypeEnum.NONE) {
    --- End diff --
    
    Please change to the more efficient switch notation. Multiple If's are messy and JDK1.8 has better switch support for string input values.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nutch pull request #126: NUTCH-2285 Digest Authentication support for Nutch ...

Posted by kamaci <gi...@git.apache.org>.
Github user kamaci commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/126#discussion_r69383358
  
    --- Diff: src/java/org/apache/nutch/api/NutchServer.java ---
    @@ -108,8 +118,41 @@ public NutchServer() {
         application.setStatusService(new ErrorStatusService());
         childContext.getAttributes().put(NUTCH_SERVER, this);
     
    -    // Attach the application.
    -    component.getDefaultHost().attach(application);
    +    AuthenticationTypeEnum authenticationType = configManager.get(ConfigResource.DEFAULT)
    +            .getEnum("restapi.auth", AuthenticationTypeEnum.NONE);
    +
    +    if (authenticationType == AuthenticationTypeEnum.NONE) {
    --- End diff --
    
    @lewismc I've added switch with enum support.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---