我正在使用OAuth2进行SSO,并且工作正常,但是我想进行一次注销(从所有应用程序注销),因为我想共享由客户端访问的由身份验证服务器(app1)设置的cookie (app2)和(app3)。
下面我尝试过
http = Loader(Config())
page = http.robotCheck()
http://127.0.0.1:8081/app2或http://127.0.0.1:8082/app3
进入app2
@GetMapping("/principal")
public Principal user(Principal principal,HttpServletResponse response,HttpServletRequest httpServletRequest) {
Cookie cookie = new Cookie("principalName", "anil");
cookie.setDomain("127.0.0.1");
cookie.setPath("/");//<-- important
cookie.setMaxAge(60 * 60 * 24 * 365 * 10);
response.addCookie(cookie);
return principal;
}