The following example demonstrates the new J2EE agent API in use.
Web Tier Use Case:
String ssotoken = AmFilterManager.getAmSSOCache().getSSOTokenForUser(HTTPRequest);
EJB Tier Use Case:
String ssotoken = AmFilterManager.getAmSSOCache().getSSOTokenForUser(EJBContext);
This public API can only retrieve the SSOToken object in EJB context if the value of the following property labeled User Principal Flag (com.sun.identity.agents.config.user.principal) is enabled