You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by arina-ielchiieva <gi...@git.apache.org> on 2017/12/13 15:27:58 UTC
[GitHub] drill pull request #1040: Drill 5425
Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/1040#discussion_r154688969
--- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/LogInLogOutResources.java ---
@@ -69,23 +79,94 @@ public Viewable getLoginPage(@Context HttpServletRequest request, @Context HttpS
return ViewableWithPermissions.createLoginPage(null);
}
+ @GET
+ @Path(WebServerConstants.SPENGO_LOGIN_RESOURCE_PATH)
+ @Produces(MediaType.TEXT_HTML)
+ public Viewable getSpnegologin(@Context HttpServletRequest request, @Context HttpServletResponse response,
+ @Context SecurityContext sc, @Context UriInfo uriInfo,
+ @QueryParam(WebServerConstants.REDIRECT_QUERY_PARM) String redirect) throws Exception {
+ if (AuthDynamicFeature.isUserLoggedIn(sc)) {
+ request.getRequestDispatcher("/").forward(request, response);
--- End diff --
1. `getSpnegologin` -> `getSpnegoLogin`
2. "/" -> replace with constant `WebServerConstants.FORM_LOGIN_RESOURCE_PATH`
---