我正在使用Angular fronend应用程序和Springboot服务器,并实现了天蓝色的SSO功能。 Azure登录URL已成功创建,用户可以放置其凭据,并且重定向已完成到我的服务器。
问题是我对此请求感到困惑,例如包含以下数据Cookie = {[searchguard_storage=vtB_nZ10yXGM...; JSESSIONID=pZvtF6...]
-如何在Cookie数据(令牌+会话ID)和春季会话之间建立联系?
-角度应用程序如何知道SSO成功,并且应该将用户重定向到他的帐户页面?并应与哪个凭证连接?
-正确的流程是什么?我如何从这里继续?
注意:成功登录sso后,将在用户浏览器中创建一个具有JSESSIONID的cookie。
这是从Azure SSO接收重定向的控制器:
@RequestMapping(method = RequestMethod.POST,path = "/secure/aad")
public ModelAndView securePage(HttpServletRequest httpRequest) throws ParseException {
IAuthenticationResult auth = SessionmanagementHelper.getauthSessionObject(httpRequest);
String tenantId = JWTParser.parse(auth.idToken()).getJWTClaimsSet().getStringClaim("tid");
String username = SessionmanagementHelper.getauthSessionObject(httpRequest).account().username(); //user email
ModelAndView mav = new ModelAndView("/login");//auth_page
setaccountInfo(mav,httpRequest);
return mav;
}