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 in the J2EE agent AMAgent.properties file is set to true as shown:
com.sun.identity.agents.config.user.principal = true