Author: anil.saldhana(a)jboss.com
Date: 2011-07-26 23:54:32 -0400 (Tue, 26 Jul 2011)
New Revision: 1133
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLConstants.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntityDescriptorType.java
Log:
PLFED-115: addtl metadata parsing
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java 2011-07-26
22:03:52 UTC (rev 1132)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/metadata/SAMLEntityDescriptorParser.java 2011-07-27
03:54:32 UTC (rev 1133)
@@ -134,6 +134,18 @@
EDTChoiceType edtChoice = EDTChoiceType.oneValue(edtDescChoice);
entityDescriptorType.addChoiceType(edtChoice);
}
+ else if (JBossSAMLConstants.AUTHN_AUTHORITY_DESCRIPTOR.get().equals(localPart))
+ {
+ throw new ParsingException("AuthnAuthorityDescriptor type not
supported");
+ }
+ else if (JBossSAMLConstants.AFFILIATION_DESCRIPTOR.get().equals(localPart))
+ {
+ throw new ParsingException("AffiliationDescriptor type not
supported");
+ }
+ else if (JBossSAMLConstants.PDP_DESCRIPTOR.get().equals(localPart))
+ {
+ throw new ParsingException("PDPDescriptor type not supported");
+ }
else if (localPart.equals(JBossSAMLConstants.SIGNATURE.get()))
{
entityDescriptorType.setSignature(StaxParserUtil.getDOMElement(xmlEventReader));
@@ -148,6 +160,10 @@
{
entityDescriptorType.addContactPerson(parseContactPerson(xmlEventReader));
}
+ else if
(JBossSAMLConstants.ADDITIONAL_METADATA_LOCATION.get().equals(localPart))
+ {
+ throw new ParsingException("AdditionalMetadataLocation type not
supported");
+ }
else if (JBossSAMLConstants.EXTENSIONS.get().equalsIgnoreCase(localPart))
{
entityDescriptorType.setExtensions(parseExtensions(xmlEventReader));
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLConstants.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLConstants.java 2011-07-26
22:03:52 UTC (rev 1132)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLConstants.java 2011-07-27
03:54:32 UTC (rev 1133)
@@ -29,6 +29,8 @@
public enum JBossSAMLConstants
{
ADDRESS( "Address" ),
+ ADDITIONAL_METADATA_LOCATION("AdditionalMetadataLocation"),
+ AFFILIATION_DESCRIPTOR("AffiliationDescriptor"),
ALLOW_CREATE( "AllowCreate" ),
ARTIFACT( "Artifact" ),
ARTIFACT_RESOLVE( "ArtifactResolve" ),
@@ -51,6 +53,7 @@
AUDIENCE_RESTRICTION( "AudienceRestriction" ),
AUTHN_CONTEXT( "AuthnContext" ),
AUTHENTICATING_AUTHORITY( "AuthenticatingAuthority" ),
+ AUTHN_AUTHORITY_DESCRIPTOR("AuthnAuthorityDescriptor"),
AUTHN_CONTEXT_CLASS_REF( "AuthnContextClassRef" ),
AUTHN_CONTEXT_DECLARATION( "AuthnContextDecl" ),
AUTHN_CONTEXT_DECLARATION_REF( "AuthnContextDeclRef" ),
@@ -111,6 +114,7 @@
ORGANIZATION_NAME( "OrganizationName" ),
ORGANIZATION_DISPLAY_NAME( "OrganizationDisplayName" ),
ORGANIZATION_URL( "OrganizationURL" ),
+ PDP_DESCRIPTOR("PDPDescriptor"),
PROTOCOL_BINDING( "ProtocolBinding" ),
PROTOCOL_SUPPORT_ENUMERATION( "protocolSupportEnumeration" ),
PROVIDER_NAME( "ProviderName" ),
Modified:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntityDescriptorType.java
===================================================================
---
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntityDescriptorType.java 2011-07-26
22:03:52 UTC (rev 1132)
+++
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntityDescriptorType.java 2011-07-27
03:54:32 UTC (rev 1133)
@@ -337,6 +337,24 @@
}
/**
+ * Add a {@link AdditionalMetadataLocationType}
+ * @param amld
+ */
+ public void addAdditionalMetadataLocationType(AdditionalMetadataLocationType amld)
+ {
+ this.additionalMetadataLocation.add(amld);
+ }
+
+ /**
+ * Remove a {@link AdditionalMetadataLocationType}
+ * @param amld
+ */
+ public void removeAdditionalMetadataLocationType(AdditionalMetadataLocationType amld)
+ {
+ this.additionalMetadataLocation.remove(amld);
+ }
+
+ /**
* Gets the value of the additionalMetadataLocation property.
*
* <p>
Show replies by date