我正在处理 webseal 身份验证,我已经创建了名称为/dgcontroller/services/dgsecure的联结,我已经创建了与联结 同名的其余 api。
这是其余的api
@RequestMapping(value = "/dgsecure", method = RequestMethod.GET)
public void handleRedirectionForDgsecure(HttpServletRequest request, HttpServletResponse response)throws IOException, DgException {
try {
System.out.println("inside my service");
String userIdentifierWebSEAL = "";
String redirectionURL = "";
userIdentifierWebSEAL = request.getHeader("iv-user");
redirectionURL = "http://192.168.2.80:10181/dgadmin/login.html";
response.sendRedirect(redirectionURL);
} catch (Exception e) {
logger.error("Error in webseal handleRedirectionForDgsecure Rest API", e);
response.sendRedirect("/dgcontroller/error.jsp");
}
}
iv-user 被成功获取,但之后它不会重定向到给定的 redirectionURL。谁能帮我解决这个问题。谢谢