i have three application . SSO(CAS SSO) application sso.com, A application app.com,confluence application bpp.com,they deploy in different server.now A application login(login to SSO application) and save the cookie a "Asession=***" ,and open new windows in browse or A redirection to confluence ,i override ConfluenceAuthenticator.(i want A redirection to B needn't login).
public class MySSOAuthenticator extends ConfluenceAuthenticator { public static final String LOGIN_SOURCE = "MyCustomSSO"; private static final Logger log = LoggerFactory.getLogger(ExampleSSOAuthenticator.class); public Principal getUser(HttpServletRequest request, HttpServletResponse response) { Cookie[] cookies = request.getCookies();
Enumeration headers= request.getHeaderNames();
//** i can't get the Asession from cookies or headers(has Iteration the cookies or headers)
String username =MySsoApi(asession) Principal existingUser = getUserFromSession(request); if (existingUser != null) { log.debug(String.format("User %s is already logged in.", existingUser.getName())); return existingUser; }
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.