Search in sources :

Example 1 with Processor

use of org.apache.wss4j.dom.processor.Processor in project ddf by codice.

the class StsIssueTest method processToken.

/**
     * Method to validate the retrieved token.
     */
private List<WSSecurityEngineResult> processToken(SecurityToken token) throws WSSecurityException {
    RequestData requestData = new RequestData();
    WSSConfig wssConfig = WSSConfig.getNewInstance();
    requestData.setWssConfig(wssConfig);
    /*DDF-733
        CallbackHandler callbackHandler = new CommonCallbackHandler();
        requestData.setCallbackHandler(callbackHandler);
        */
    Crypto crypto = CryptoFactory.getInstance("serverKeystore.properties");
    requestData.setDecCrypto(crypto);
    requestData.setSigVerCrypto(crypto);
    Processor processor = new SAMLTokenProcessor();
    return processor.handleToken(token.getToken(), requestData, new WSDocInfo(token.getToken().getOwnerDocument()));
}
Also used : WSDocInfo(org.apache.wss4j.dom.WSDocInfo) Crypto(org.apache.wss4j.common.crypto.Crypto) SAMLTokenProcessor(org.apache.wss4j.dom.processor.SAMLTokenProcessor) Processor(org.apache.wss4j.dom.processor.Processor) WSSConfig(org.apache.wss4j.dom.engine.WSSConfig) RequestData(org.apache.wss4j.dom.handler.RequestData) SAMLTokenProcessor(org.apache.wss4j.dom.processor.SAMLTokenProcessor)

Aggregations

Crypto (org.apache.wss4j.common.crypto.Crypto)1 WSDocInfo (org.apache.wss4j.dom.WSDocInfo)1 WSSConfig (org.apache.wss4j.dom.engine.WSSConfig)1 RequestData (org.apache.wss4j.dom.handler.RequestData)1 Processor (org.apache.wss4j.dom.processor.Processor)1 SAMLTokenProcessor (org.apache.wss4j.dom.processor.SAMLTokenProcessor)1