Using the JACC PolicyContext to Access the Current ServletRequest
You can access the current servlet request to gain access to request header information using the JACC PolicyContext API:
import javax.security.jacc.PolicyContext; import javax.security.jacc.PolicyContextException; /** The JACC PolicyContext key for the current Subject */ public static final String WEB_REQUEST_KEY = "javax.servlet.http.HttpServletRequest"; HttpServletRequest request = (HttpServletRequest) PolicyContext.getContext(WEB_REQUEST_KEY);
Referenced by:
Comments