Search in sources :

Example 6 with SAMLTokenProcessor

use of org.apache.wss4j.dom.processor.SAMLTokenProcessor in project cxf by apache.

the class CustomParameterTest method processToken.

private List<WSSecurityEngineResult> processToken(Element assertionElement) throws Exception {
    RequestData requestData = new RequestData();
    requestData.setDisableBSPEnforcement(true);
    CallbackHandler callbackHandler = new org.apache.cxf.systest.sts.common.CommonCallbackHandler();
    requestData.setCallbackHandler(callbackHandler);
    Crypto crypto = CryptoFactory.getInstance("serviceKeystore.properties");
    requestData.setDecCrypto(crypto);
    requestData.setSigVerCrypto(crypto);
    requestData.setWsDocInfo(new WSDocInfo(assertionElement.getOwnerDocument()));
    Processor processor = new SAMLTokenProcessor();
    return processor.handleToken(assertionElement, requestData);
}
Also used : WSDocInfo(org.apache.wss4j.dom.WSDocInfo) CallbackHandler(javax.security.auth.callback.CallbackHandler) Crypto(org.apache.wss4j.common.crypto.Crypto) SAMLTokenProcessor(org.apache.wss4j.dom.processor.SAMLTokenProcessor) Processor(org.apache.wss4j.dom.processor.Processor) RequestData(org.apache.wss4j.dom.handler.RequestData) SAMLTokenProcessor(org.apache.wss4j.dom.processor.SAMLTokenProcessor)

Aggregations

WSDocInfo (org.apache.wss4j.dom.WSDocInfo)6 RequestData (org.apache.wss4j.dom.handler.RequestData)6 SAMLTokenProcessor (org.apache.wss4j.dom.processor.SAMLTokenProcessor)6 Crypto (org.apache.wss4j.common.crypto.Crypto)4 Processor (org.apache.wss4j.dom.processor.Processor)4 CallbackHandler (javax.security.auth.callback.CallbackHandler)3 CommonCallbackHandler (org.apache.cxf.systest.sts.common.CommonCallbackHandler)1 WSSecurityException (org.apache.wss4j.common.ext.WSSecurityException)1 WSSConfig (org.apache.wss4j.dom.engine.WSSConfig)1