/** * Constructor. * * @param descriptor the KeyDescriptor context from which a credential was resolved */ public SAMLMDCredentialContext(KeyDescriptor descriptor) { keyDescriptor = descriptor; if (descriptor != null) { // KeyDescriptor / EncryptionMethod encMethods = descriptor.getEncryptionMethods(); // KeyDescriptor -> RoleDescriptor role = (RoleDescriptor) descriptor.getParent(); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { KeyDescriptor keyDescriptor = (KeyDescriptor) parentSAMLObject; if (childSAMLObject instanceof KeyInfo) { keyDescriptor.setKeyInfo((KeyInfo) childSAMLObject); } else if (childSAMLObject instanceof EncryptionMethod) { keyDescriptor.getEncryptionMethods().add((EncryptionMethod) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }