new org.apache.xml.security.binding.xmldsig.ObjectFactory().createX509Data((X509DataType) object);
keyInfoType = new KeyInfoType();
SecurityTokenReferenceType securityTokenReferenceType = new SecurityTokenReferenceType();
securityTokenReferenceType.getAny().add(x509DataTypeJAXBElement);
JAXBElement<SecurityTokenReferenceType> securityTokenReferenceTypeJAXBElement =
new ObjectFactory().createSecurityTokenReference(securityTokenReferenceType);
keyInfoType.getContent().add(securityTokenReferenceTypeJAXBElement);
} else if (object instanceof EncryptedKeyType) {
EncryptedKeyType encryptedKeyType = (EncryptedKeyType) object;
WSSEncryptedKeyInputHandler encryptedKeyInputHandler = new WSSEncryptedKeyInputHandler();
encryptedKeyInputHandler.handle(inputProcessorChain, encryptedKeyType, xmlSecStartElement, securityProperties);
SecurityTokenProvider<? extends InboundSecurityToken> securityTokenProvider =
inputProcessorChain.getSecurityContext().getSecurityTokenProvider(encryptedKeyType.getId());
if (securityTokenProvider != null) {
return securityTokenProvider.getSecurityToken();
}
} else if (object instanceof SecurityTokenReferenceType) {
JAXBElement<SecurityTokenReferenceType> securityTokenReferenceTypeJAXBElement =
new ObjectFactory().createSecurityTokenReference((SecurityTokenReferenceType) object);
keyInfoType = new KeyInfoType();
keyInfoType.getContent().add(securityTokenReferenceTypeJAXBElement);
} else if (object instanceof KeyValueType) {
JAXBElement<KeyValueType> keyValueTypeJAXBElement =
new org.apache.xml.security.binding.xmldsig.ObjectFactory().createKeyValue((KeyValueType) object);