Search in sources :

Example 1 with CmisSecurityHandler

use of nl.nn.adapterframework.extensions.cmis.server.CmisSecurityHandler in project iaf by ibissource.

the class CmisUtils method populateCmisAttributes.

public static void populateCmisAttributes(PipeLineSession session) {
    CallContext callContext = (CallContext) session.get(CMIS_CALLCONTEXT_KEY);
    if (callContext != null) {
        session.put(CMIS_VERSION_KEY, callContext.getCmisVersion());
        session.put(CMIS_BINDING_KEY, callContext.getBinding());
        if ("basic".equalsIgnoreCase(CMIS_SECURITYHANDLER)) {
            HttpServletRequest request = (HttpServletRequest) callContext.get(CallContext.HTTP_SERVLET_REQUEST);
            session.setSecurityHandler(new HttpSecurityHandler(request));
        } else if ("wsse".equalsIgnoreCase(CMIS_SECURITYHANDLER)) {
            session.setSecurityHandler(new CmisSecurityHandler(callContext));
        }
    }
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) CmisSecurityHandler(nl.nn.adapterframework.extensions.cmis.server.CmisSecurityHandler) HttpSecurityHandler(nl.nn.adapterframework.http.HttpSecurityHandler) CallContext(org.apache.chemistry.opencmis.commons.server.CallContext)

Aggregations

HttpServletRequest (javax.servlet.http.HttpServletRequest)1 CmisSecurityHandler (nl.nn.adapterframework.extensions.cmis.server.CmisSecurityHandler)1 HttpSecurityHandler (nl.nn.adapterframework.http.HttpSecurityHandler)1 CallContext (org.apache.chemistry.opencmis.commons.server.CallContext)1