for (EDTDescriptorChoiceType edtDesc : edtDescriptorChoiceTypeList) IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null)
private void removeIdPDescriptor(EntitiesDescriptorType entities) { for (Object descriptorType : new ArrayList<Object>(entities.getEntityDescriptor())) { for (EntityDescriptorType.EDTChoiceType choiceType : ((EntityDescriptorType) descriptorType).getChoiceType()) { for (EntityDescriptorType.EDTDescriptorChoiceType descriptorChoiceType : choiceType.getDescriptors()) { if (descriptorChoiceType.getIdpDescriptor() != null) { entities.removeEntityDescriptor(descriptorType); } } } } }
for (EDTDescriptorChoiceType edtDesc : edtDescriptorChoiceTypeList) IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null)
throw logger.notImplementedYet("Role Descriptor type"); IDPSSODescriptorType idpSSO = edtDescChoice.getIdpDescriptor(); if (idpSSO != null) write(idpSSO);
throw new RuntimeException(ErrorCodes.NOT_IMPLEMENTED_YET + "Role Descriptor type"); IDPSSODescriptorType idpSSO = edtDescChoice.getIdpDescriptor(); if (idpSSO != null) write(idpSSO);
throw logger.notImplementedYet("Role Descriptor type"); IDPSSODescriptorType idpSSO = edtDescChoice.getIdpDescriptor(); if (idpSSO != null) write(idpSSO);
throw new RuntimeException(ErrorCodes.NOT_IMPLEMENTED_YET + "Role Descriptor type"); IDPSSODescriptorType idpSSO = edtDescChoice.getIdpDescriptor(); if (idpSSO != null) write(idpSSO);
throw logger.notImplementedYet("Role Descriptor type"); IDPSSODescriptorType idpSSO = edtDescChoice.getIdpDescriptor(); if (idpSSO != null) write(idpSSO);
/** * @see IMetadataConfigurationStore#persist(EntityDescriptorType, String) */ public void persist(EntityDescriptorType entity, String id) throws IOException { File persistedFile = validateIdAndReturnMDFile(id); try { XMLStreamWriter streamWriter = StaxUtil.getXMLStreamWriter(new FileOutputStream(persistedFile)); SAMLMetadataWriter writer = new SAMLMetadataWriter(streamWriter); writer.writeEntityDescriptor(entity); } catch (ProcessingException e) { throw new RuntimeException(e); } logger.trace("Persisted entity descriptor into " + persistedFile.getPath()); // Process the EDT List<EDTChoiceType> edtChoiceTypeList = entity.getChoiceType(); for (EDTChoiceType edtChoiceType : edtChoiceTypeList) { List<EDTDescriptorChoiceType> edtDescriptorChoiceTypeList = edtChoiceType.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptorChoiceTypeList) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { addIdentityProvider(id); } SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { addServiceProvider(id); } } } }
/** * @see IMetadataConfigurationStore#persist(EntityDescriptorType, String) */ public void persist(EntityDescriptorType entity, String id) throws IOException { File persistedFile = validateIdAndReturnMDFile(id); try { XMLStreamWriter streamWriter = StaxUtil.getXMLStreamWriter(new FileOutputStream(persistedFile)); SAMLMetadataWriter writer = new SAMLMetadataWriter(streamWriter); writer.writeEntityDescriptor(entity); } catch (ProcessingException e) { throw new RuntimeException(e); } logger.trace("Persisted entity descriptor into " + persistedFile.getPath()); // Process the EDT List<EDTChoiceType> edtChoiceTypeList = entity.getChoiceType(); for (EDTChoiceType edtChoiceType : edtChoiceTypeList) { List<EDTDescriptorChoiceType> edtDescriptorChoiceTypeList = edtChoiceType.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptorChoiceTypeList) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { addIdentityProvider(id); } SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { addServiceProvider(id); } } } }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType choiceTypeDesc : objs) { AttributeAuthorityDescriptorType attribDescriptor = choiceTypeDesc.getAttribDescriptor(); if (attribDescriptor != null) attribDescriptor.addKeyDescriptor(keyD); AuthnAuthorityDescriptorType authnDescriptor = choiceTypeDesc.getAuthnDescriptor(); if (authnDescriptor != null) authnDescriptor.addKeyDescriptor(keyD); IDPSSODescriptorType idpDescriptor = choiceTypeDesc.getIdpDescriptor(); if (idpDescriptor != null) idpDescriptor.addKeyDescriptor(keyD); PDPDescriptorType pdpDescriptor = choiceTypeDesc.getPdpDescriptor(); if (pdpDescriptor != null) pdpDescriptor.addKeyDescriptor(keyD); RoleDescriptorType roleDescriptor = choiceTypeDesc.getRoleDescriptor(); if (roleDescriptor != null) roleDescriptor.addKeyDescriptor(keyD); SPSSODescriptorType spDescriptorType = choiceTypeDesc.getSpDescriptor(); if (spDescriptorType != null) spDescriptorType.addKeyDescriptor(keyD); } } } }
/** * @see IMetadataConfigurationStore#persist(EntityDescriptorType, String) */ public void persist(EntityDescriptorType entity, String id) throws IOException { File persistedFile = validateIdAndReturnMDFile(id); try { XMLStreamWriter streamWriter = StaxUtil.getXMLStreamWriter(new FileOutputStream(persistedFile)); SAMLMetadataWriter writer = new SAMLMetadataWriter(streamWriter); writer.writeEntityDescriptor(entity); } catch (ProcessingException e) { throw new RuntimeException(e); } logger.trace("Persisted entity descriptor into " + persistedFile.getPath()); // Process the EDT List<EDTChoiceType> edtChoiceTypeList = entity.getChoiceType(); for (EDTChoiceType edtChoiceType : edtChoiceTypeList) { List<EDTDescriptorChoiceType> edtDescriptorChoiceTypeList = edtChoiceType.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptorChoiceTypeList) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { addIdentityProvider(id); } SPSSODescriptorType spSSO = edtDesc.getSpDescriptor(); if (spSSO != null) { addServiceProvider(id); } } } }
/** * Get the IDP metadata descriptor from an entity descriptor * @param entityDescriptor * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
private void updateKeyDescriptor(EntityDescriptorType entityD, KeyDescriptorType keyD) { List<EDTDescriptorChoiceType> objs = entityD.getChoiceType().get(0).getDescriptors(); if (objs != null) { for (EDTDescriptorChoiceType choiceTypeDesc : objs) { AttributeAuthorityDescriptorType attribDescriptor = choiceTypeDesc.getAttribDescriptor(); if (attribDescriptor != null) attribDescriptor.addKeyDescriptor(keyD); AuthnAuthorityDescriptorType authnDescriptor = choiceTypeDesc.getAuthnDescriptor(); if (authnDescriptor != null) authnDescriptor.addKeyDescriptor(keyD); IDPSSODescriptorType idpDescriptor = choiceTypeDesc.getIdpDescriptor(); if (idpDescriptor != null) idpDescriptor.addKeyDescriptor(keyD); PDPDescriptorType pdpDescriptor = choiceTypeDesc.getPdpDescriptor(); if (pdpDescriptor != null) pdpDescriptor.addKeyDescriptor(keyD); RoleDescriptorType roleDescriptor = choiceTypeDesc.getRoleDescriptor(); if (roleDescriptor != null) roleDescriptor.addKeyDescriptor(keyD); SPSSODescriptorType spDescriptorType = choiceTypeDesc.getSpDescriptor(); if (spDescriptorType != null) spDescriptorType.addKeyDescriptor(keyD); } } } }
/** * Get the IDP metadata descriptor from an entity descriptor * @param entityDescriptor * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
/** * Get the IDP metadata descriptor from an entity descriptor * * @param entityDescriptor * * @return */ public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor) { List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType(); for (EDTChoiceType edt : edtChoices) { List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors(); for (EDTDescriptorChoiceType edtDesc : edtDescriptors) { IDPSSODescriptorType idpSSO = edtDesc.getIdpDescriptor(); if (idpSSO != null) { return idpSSO; } } } return null; }
private void removeIdPDescriptor(EntitiesDescriptorType entities) { for (Object descriptorType : new ArrayList<Object>(entities.getEntityDescriptor())) { for (EntityDescriptorType.EDTChoiceType choiceType : ((EntityDescriptorType) descriptorType).getChoiceType()) { for (EntityDescriptorType.EDTDescriptorChoiceType descriptorChoiceType : choiceType.getDescriptors()) { if (descriptorChoiceType.getIdpDescriptor() != null) { entities.removeEntityDescriptor(descriptorType); } } } } }