I've tested SSO with cookie based approach, everything is working fine except when I tried to make cookie secure then AEM is displaying login page. My code which is running on Tomcat: protected void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException { ...