Browse files

Small test modification to allow for authentication mechanism configu…

…red for web app to be returned after programatic authentication.
  • Loading branch information...
1 parent 55b1f3c commit 689f5ce80d7a7c4755050fe96f6b910d14ef61aa @darranl darranl committed with kabir Mar 27, 2013
@@ -52,8 +52,8 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se
if (remoteUser == null)
throw new ServletException("getRemoteUser returned null");
String authType = req.getAuthType();
- if (authType == null || !authType.equals("LOGIN"))
- throw new ServletException("getAuthType returned null or wrong type");
+ if (authType == null || !authType.equals("BASIC"))
+ throw new ServletException(String.format("getAuthType returned wrong type '%s'", authType));
if (!req.isUserInRole("gooduser")) {
@@ -34,9 +34,7 @@
import static;
import static org.junit.Assert.assertEquals;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;

0 comments on commit 689f5ce

Please sign in to comment.