Source:
public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException { accessor = PropertyAccessor.getInstance(); LOG.trace("CXFSAMLCallbackHandler.handle begin"); for (final Callback callback : callbacks) { if (callback instanceof SAMLCallback) { try { final Message message = getCurrentMessage(); final Object obj = message.get("assertion"); AssertionType custAssertion; custAssertion = getCustAssertion(obj); final SAMLCallback oSAMLCallback = (SAMLCallback) callback; oSAMLCallback.setIssuerKeyName( accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.ISSUER_KEY_STRING)); oSAMLCallback.setIssuerKeyPassword( accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.ISSUER_KEY_PASSWORD)); oSAMLCallback.setSignAssertion(accessor.getPropertyBoolean(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SIGN_ASSERTION_BOOL)); oSAMLCallback.setSendKeyValue(accessor.getPropertyBoolean(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SEND_KEYVALUE_BOOL)); issuerCrypto = CryptoFactory.getInstance(accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SIGNATURE_PROPERTIES_STRING)); oSAMLCallback.setIssuerCrypto(issuerCrypto); oSAMLCallback.setSamlVersion(Version.SAML_20); oSAMLCallback.setSignatureAlgorithm(SPConstants.SHA1); oSAMLCallback.setSignatureDigestAlgorithm(SPConstants.SHA1); final SamlTokenCreator creator = new SamlTokenCreator(); final CallbackProperties properties = new CallbackMapProperties(addMessageProperties( creator.createRequestContext(custAssertion, getResource(message), null), message)); oSAMLCallback.setAssertionElement(builder.build(properties)); } catch (final Exception e) { LOG.error("Failed to create saml: {}", e.getLocalizedMessage(), e); } } } LOG.trace("CXFSAMLCallbackHandler.handle end"); }

Target:
public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException { LOG.trace("CXFSAMLCallbackHandler.handle begin"); for (final Callback callback : callbacks) { if (callback instanceof SAMLCallback) { try { final Message message = getCurrentMessage(); final Object obj = message.get("assertion"); AssertionType custAssertion = getCustAssertion(obj); final SAMLCallback oSAMLCallback = (SAMLCallback) callback; oSAMLCallback.setIssuerKeyName( accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.ISSUER_KEY_STRING)); oSAMLCallback.setIssuerKeyPassword( accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.ISSUER_KEY_VALUE)); oSAMLCallback.setSignAssertion(accessor.getPropertyBoolean(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SIGN_ASSERTION_BOOL)); oSAMLCallback.setSendKeyValue(accessor.getPropertyBoolean(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SEND_KEYVALUE_BOOL)); issuerCrypto = CryptoFactory.getInstance(accessor.getProperty(NhincConstants.SAML_PROPERTY_FILE, NhincConstants.SIGNATURE_PROPERTIES_STRING)); oSAMLCallback.setIssuerCrypto(issuerCrypto); oSAMLCallback.setSamlVersion(Version.SAML_20); oSAMLCallback.setSignatureAlgorithm(SPConstants.SHA1); oSAMLCallback.setSignatureDigestAlgorithm(SPConstants.SHA1); final SamlTokenCreator creator = new SamlTokenCreator(); final CallbackProperties properties = new CallbackMapProperties(addMessageProperties( creator.createRequestContext(custAssertion, getResource(message), null), message)); oSAMLCallback.setAssertionElement(builder.build(properties)); } catch (final Exception e) { LOG.error("Failed to create saml: {}", e.getLocalizedMessage(), e); } } } LOG.trace("CXFSAMLCallbackHandler.handle end"); }