doSignature(token, wrapper);
config.put(ConfigurationConstants.INCLUDE_SIGNATURE_TOKEN, "true");
config.put(ConfigurationConstants.SIG_ALGO,
tbinding.getAlgorithmSuite().getSymmetricSignature());
AlgorithmSuiteType algType = tbinding.getAlgorithmSuite().getAlgorithmSuiteType();
config.put(ConfigurationConstants.SIG_DIGEST_ALGO, algType.getDigest());
} else if (token instanceof X509Token || token instanceof KeyValueToken) {
doSignature(token, wrapper);
} else if (token instanceof SamlToken) {
addSamlToken((SamlToken)token, false, true);
signPartsAndElements(wrapper.getSignedParts(), wrapper.getSignedElements());
Map<String, Object> config = getProperties();
config.put(ConfigurationConstants.SIG_ALGO,
tbinding.getAlgorithmSuite().getAsymmetricSignature());
AlgorithmSuiteType algType = tbinding.getAlgorithmSuite().getAlgorithmSuiteType();
config.put(ConfigurationConstants.SIG_DIGEST_ALGO, algType.getDigest());
} else if (token instanceof UsernameToken) {
throw new Exception("Endorsing UsernameTokens are not supported in the streaming code");
} else if (token instanceof KerberosToken) {
Map<String, Object> config = getProperties();
String signatureAction = ConfigurationConstants.SIGNATURE;
if (config.containsKey(ConfigurationConstants.ACTION)) {
String action = (String)config.get(ConfigurationConstants.ACTION);
config.put(ConfigurationConstants.ACTION, action + " " + signatureAction);
} else {
config.put(ConfigurationConstants.ACTION, signatureAction);
}
configureSignature(wrapper, token, false);
addKerberosToken((KerberosToken)token, false, true, false);
signPartsAndElements(wrapper.getSignedParts(), wrapper.getSignedElements());
config.put(ConfigurationConstants.SIG_ALGO,
tbinding.getAlgorithmSuite().getSymmetricSignature());
AlgorithmSuiteType algType = tbinding.getAlgorithmSuite().getAlgorithmSuiteType();
config.put(ConfigurationConstants.SIG_DIGEST_ALGO, algType.getDigest());
}
}