Picketlink SVN: r1027 - in federation/trunk/picketlink-fed-core/src/test: resources/parser/saml1 and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-23 16:07:49 -0400 (Thu, 23 Jun 2011)
New Revision: 1027
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml
Log:
more SAML11 parsing
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 19:58:53 UTC (rev 1026)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 20:07:49 UTC (rev 1027)
@@ -207,22 +207,22 @@
assertEquals(4, attributes.size());
SAML11AttributeType attr = attributes.get(0);
assertEquals("uid", attr.getAttributeName());
- assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("12345", attr.get().get(0));
attr = attributes.get(1);
assertEquals("groupMembership", attr.getAttributeName());
- assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("uugid=middleware.staff,ou=Groups,dc=vt,dc=edu", attr.get().get(0));
attr = attributes.get(2);
assertEquals("eduPersonAffiliation", attr.getAttributeName());
- assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("staff", attr.get().get(0));
attr = attributes.get(3);
assertEquals("accountState", attr.getAttributeName());
- assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("http://jboss.org/test", attr.getAttributeNamespace().toString());
assertEquals("ACTIVE", attr.get().get(0));
SAML11AuthenticationStatementType authStat = (SAML11AuthenticationStatementType) statements.get(1);
Modified: federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml 2011-06-23 19:58:53 UTC (rev 1026)
+++ federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml 2011-06-23 20:07:49 UTC (rev 1027)
@@ -19,21 +19,21 @@
</SubjectConfirmation>
</Subject>
<Attribute AttributeName="uid"
- AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ AttributeNamespace="http://jboss.org/test">
<AttributeValue>12345</AttributeValue>
</Attribute>
<Attribute AttributeName="groupMembership"
- AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ AttributeNamespace="http://jboss.org/test">
<AttributeValue>
uugid=middleware.staff,ou=Groups,dc=vt,dc=edu
</AttributeValue>
</Attribute>
<Attribute AttributeName="eduPersonAffiliation"
- AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ AttributeNamespace="http://jboss.org/test">
<AttributeValue>staff</AttributeValue>
</Attribute>
<Attribute AttributeName="accountState"
- AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ AttributeNamespace="http://jboss.org/test">
<AttributeValue>ACTIVE</AttributeValue>
</Attribute>
</AttributeStatement>
13 years, 6 months
Picketlink SVN: r1026 - in federation/trunk: picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util and 5 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-23 15:58:53 -0400 (Thu, 23 Jun 2011)
New Revision: 1026
Added:
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-authzdecision.xml
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java
Log:
more SAML11 parsing
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -45,6 +45,7 @@
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthorizationDecisionStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
@@ -139,44 +140,9 @@
else if (JBossSAMLConstants.CONDITIONS.get().equalsIgnoreCase(tag))
{
startElement = (StartElement) xmlEvent;
- SAML11ConditionsType conditions = new SAML11ConditionsType();
- assertion.setConditions(conditions);
- StartElement conditionsElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(conditionsElement, JBossSAMLConstants.CONDITIONS.get());
-
- String assertionNS = SAML11Constants.ASSERTION_11_NSURI;
-
- QName notBeforeQName = new QName("", JBossSAMLConstants.NOT_BEFORE.get());
- QName notBeforeQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_BEFORE.get());
-
- QName notAfterQName = new QName("", JBossSAMLConstants.NOT_ON_OR_AFTER.get());
- QName notAfterQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_ON_OR_AFTER.get());
-
- Attribute notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQName);
- if (notBeforeAttribute == null)
- notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQNameWithNS);
-
- Attribute notAfterAttribute = conditionsElement.getAttributeByName(notAfterQName);
- if (notAfterAttribute == null)
- notAfterAttribute = conditionsElement.getAttributeByName(notAfterQNameWithNS);
-
- if (notBeforeAttribute != null)
- {
- String notBeforeValue = StaxParserUtil.getAttributeValue(notBeforeAttribute);
- conditions.setNotBefore(XMLTimeUtil.parse(notBeforeValue));
- }
-
- if (notAfterAttribute != null)
- {
- String notAfterValue = StaxParserUtil.getAttributeValue(notAfterAttribute);
- conditions.setNotOnOrAfter(XMLTimeUtil.parse(notAfterValue));
- }
-
+ SAML11ConditionsType conditions = SAML11ParserUtil.parseSAML11Conditions(xmlEventReader);
assertion.setConditions(conditions);
-
- EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, JBossSAMLConstants.CONDITIONS.get());
}
else if (SAML11Constants.AUTHENTICATION_STATEMENT.equals(tag))
{
@@ -184,53 +150,18 @@
SAML11AuthenticationStatementType authStat = SAMLParserUtil.parseAuthenticationStatement(xmlEventReader);
assertion.add(authStat);
}
- else if (JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase(tag))
+ else if (SAML11Constants.ATTRIBUTE_STATEMENT.equalsIgnoreCase(tag))
{
SAML11AttributeStatementType attributeStatementType = SAML11ParserUtil
.parseSAML11AttributeStatement(xmlEventReader);
assertion.add(attributeStatementType);
}
- /*else if (JBossSAMLConstants.AUTHN_STATEMENT.get().equalsIgnoreCase(tag))
+ else if (SAML11Constants.AUTHORIZATION_DECISION_STATEMENT.equalsIgnoreCase(tag))
{
- AuthnStatementType authnStatementType = SAMLParserUtil.parseAuthnStatement(xmlEventReader);
- assertion.addStatement(authnStatementType);
+ SAML11AuthorizationDecisionStatementType authzStat = SAML11ParserUtil
+ .parseSAML11AuthorizationDecisionStatement(xmlEventReader);
+ assertion.add(authzStat);
}
- else if (JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase(tag))
- {
- AttributeStatementType attributeStatementType = SAMLParserUtil.parseAttributeStatement(xmlEventReader);
- assertion.addStatement(attributeStatementType);
- }
- else if (JBossSAMLConstants.STATEMENT.get().equalsIgnoreCase(tag))
- {
- startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-
- String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
- if (xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_STATEMENT_TYPE.get()))
- {
- XACMLAuthzDecisionStatementType authZStat = new XACMLAuthzDecisionStatementType();
-
- startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
- tag = StaxParserUtil.getStartElementName(startElement);
-
- if (tag.contains(JBossSAMLConstants.RESPONSE.get()))
- {
- authZStat.setResponse(getXACMLResponse(xmlEventReader));
- startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
- //There may be request also
- tag = StaxParserUtil.getStartElementName(startElement);
- if (tag.contains(JBossSAMLConstants.REQUEST.get()))
- {
- authZStat.setRequest(getXACMLRequest(xmlEventReader));
- }
- }
-
- EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, JBossSAMLConstants.STATEMENT.get());
- assertion.addStatement(authZStat);
- }
- else
- throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
- }*/
else
throw new RuntimeException("SAML11AssertionParser:: unknown: " + tag + "::location="
+ peekedElement.getLocation());
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -94,8 +94,14 @@
nameID.setFormat(URI.create(StaxParserUtil.getAttributeValue(formatAtt)));
}
+ Attribute nameQAtt = peekedElement.getAttributeByName(new QName(SAML11Constants.NAME_QUALIFIER));
+ if (nameQAtt != null)
+ {
+ nameID.setNameQualifier(StaxParserUtil.getAttributeValue(formatAtt));
+ }
+
String val = StaxParserUtil.getElementText(xmlEventReader);
- nameID.setNameQualifier(val);
+ nameID.setValue(val);
SAML11SubjectTypeChoice subChoice = new SAML11SubjectTypeChoice(nameID);
subject.setChoice(subChoice);
}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -35,8 +35,14 @@
import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ActionType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AudienceRestrictionCondition;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthorizationDecisionStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11DecisionType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
/**
@@ -180,4 +186,138 @@
throw new RuntimeException("Unsupported xsi:type=" + typeValue);
}
-}
+
+ public static SAML11AuthorizationDecisionStatementType parseSAML11AuthorizationDecisionStatement(
+ XMLEventReader xmlEventReader) throws ParsingException
+ {
+ SAML11AuthorizationDecisionStatementType authzDecision = null;
+
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT);
+
+ Attribute decision = startElement.getAttributeByName(new QName(SAML11Constants.DECISION));
+ if (decision == null)
+ throw new RuntimeException("Required attribute Decision in Attribute");
+ String decisionValue = StaxParserUtil.getAttributeValue(decision);
+
+ Attribute resource = startElement.getAttributeByName(new QName(SAML11Constants.RESOURCE));
+ if (resource == null)
+ throw new RuntimeException("Required attribute Namespace in Attribute");
+ String resValue = StaxParserUtil.getAttributeValue(resource);
+
+ authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue),
+ SAML11DecisionType.valueOf(decisionValue));
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement end = StaxParserUtil.getNextEndElement(xmlEventReader);
+ if (StaxParserUtil.matches(end, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT))
+ break;
+ }
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
+ break;
+ String tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (SAML11Constants.ACTION.equals(tag))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ SAML11ActionType samlAction = new SAML11ActionType();
+ Attribute namespaceAttr = startElement.getAttributeByName(new QName(SAML11Constants.NAMESPACE));
+ if (namespaceAttr != null)
+ {
+ samlAction.setNamespace(StaxParserUtil.getAttributeValue(namespaceAttr));
+ }
+ samlAction.setValue(StaxParserUtil.getElementText(xmlEventReader));
+
+ authzDecision.addAction(samlAction);
+ }
+ else if (JBossSAMLConstants.SUBJECT.get().equals(tag))
+ {
+ SAML11SubjectParser parser = new SAML11SubjectParser();
+ authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader));
+ }
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::Location=" + startElement.getLocation());
+ }
+ return authzDecision;
+ }
+
+ /**
+ * Parse {@link SAML11ConditionsType}
+ * @param xmlEventReader
+ * @return
+ * @throws ParsingException
+ */
+ public static SAML11ConditionsType parseSAML11Conditions(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement;
+ SAML11ConditionsType conditions = new SAML11ConditionsType();
+ StartElement conditionsElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(conditionsElement, JBossSAMLConstants.CONDITIONS.get());
+
+ String assertionNS = SAML11Constants.ASSERTION_11_NSURI;
+
+ QName notBeforeQName = new QName("", JBossSAMLConstants.NOT_BEFORE.get());
+ QName notBeforeQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_BEFORE.get());
+
+ QName notAfterQName = new QName("", JBossSAMLConstants.NOT_ON_OR_AFTER.get());
+ QName notAfterQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_ON_OR_AFTER.get());
+
+ Attribute notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQName);
+ if (notBeforeAttribute == null)
+ notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQNameWithNS);
+
+ Attribute notAfterAttribute = conditionsElement.getAttributeByName(notAfterQName);
+ if (notAfterAttribute == null)
+ notAfterAttribute = conditionsElement.getAttributeByName(notAfterQNameWithNS);
+
+ if (notBeforeAttribute != null)
+ {
+ String notBeforeValue = StaxParserUtil.getAttributeValue(notBeforeAttribute);
+ conditions.setNotBefore(XMLTimeUtil.parse(notBeforeValue));
+ }
+
+ if (notAfterAttribute != null)
+ {
+ String notAfterValue = StaxParserUtil.getAttributeValue(notAfterAttribute);
+ conditions.setNotOnOrAfter(XMLTimeUtil.parse(notAfterValue));
+ }
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement end = StaxParserUtil.getNextEndElement(xmlEventReader);
+ if (StaxParserUtil.matches(end, JBossSAMLConstants.CONDITIONS.get()))
+ break;
+ }
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
+ break;
+ String tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (SAML11Constants.AUDIENCE_RESTRICTION_CONDITION.equals(tag))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ SAML11AudienceRestrictionCondition restrictCond = new SAML11AudienceRestrictionCondition();
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ if (StaxParserUtil.getStartElementName(startElement).equals(JBossSAMLConstants.AUDIENCE.get()))
+ {
+ restrictCond.add(URI.create(StaxParserUtil.getElementText(xmlEventReader)));
+ }
+ EndElement theEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(theEndElement, SAML11Constants.AUDIENCE_RESTRICTION_CONDITION);
+ conditions.add(restrictCond);
+ }
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::Location=" + startElement.getLocation());
+ }
+ return conditions;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -22,11 +22,14 @@
package org.picketlink.identity.federation.core.saml.v1;
/**
+ * Constants for the SAML v1.1 Specifications
* @author Anil.Saldhana(a)redhat.com
* @since Jun 22, 2011
*/
public interface SAML11Constants
{
+ String ACTION = "Action";
+
String ASSERTIONID = "AssertionID";
String ASSERTION_11_NSURI = "urn:oasis:names:tc:SAML:1.0:assertion";
@@ -35,14 +38,22 @@
String ATTRIBUTE_NAMESPACE = "AttributeNamespace";
+ String ATTRIBUTE_STATEMENT = "AttributeStatement";
+
+ String AUDIENCE_RESTRICTION_CONDITION = "AudienceRestrictionCondition";
+
String AUTHENTICATION_INSTANT = "AuthenticationInstant";
String AUTHENTICATION_METHOD = "AuthenticationMethod";
String AUTHENTICATION_STATEMENT = "AuthenticationStatement";
+ String AUTHORIZATION_DECISION_STATEMENT = "AuthorizationDecisionStatement";
+
String CONFIRMATION_METHOD = "ConfirmationMethod";
+ String DECISION = "Decision";
+
String FORMAT = "Format";
String ISSUER = "Issuer";
@@ -52,4 +63,10 @@
String MINOR_VERSION = "MinorVersion";
String NAME_IDENTIFIER = "NameIdentifier";
+
+ String NAME_QUALIFIER = "NameQualifier";
+
+ String NAMESPACE = "Namespace";
+
+ String RESOURCE = "Resource";
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -35,10 +35,15 @@
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AudienceRestrictionCondition;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionAbstractType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11NameIdentifierType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11StatementAbstractType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectConfirmationType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType.SAML11SubjectTypeChoice;
/**
* Unit Test the parsing of SAML 1.1 assertion
@@ -74,7 +79,7 @@
SAML11SubjectType subject = stat.getSubject();
SAML11SubjectType.SAML11SubjectTypeChoice choice = subject.getChoice();
- assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("user(a)idp.example.org", choice.getNameID().getValue());
assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
SAML11SubjectConfirmationType subjectConfirm = subject.getSubjectConfirmation();
@@ -109,7 +114,7 @@
SAML11SubjectType subject = stat.getSubject();
SAML11SubjectType.SAML11SubjectTypeChoice choice = subject.getChoice();
- assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("user(a)idp.example.org", choice.getNameID().getValue());
assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
SAML11SubjectConfirmationType subjectConfirm = subject.getSubjectConfirmation();
@@ -121,7 +126,7 @@
subject = attribStat.getSubject();
choice = subject.getChoice();
- assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("user(a)idp.example.org", choice.getNameID().getValue());
assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
subjectConfirm = subject.getSubjectConfirmation();
@@ -138,4 +143,97 @@
assertTrue(attribValues.contains("member"));
assertTrue(attribValues.contains("student"));
}
+
+ @Test
+ public void testSAML11AssertionWithAuthzDecisionStatement() throws Exception
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream configStream = tcl.getResourceAsStream("parser/saml1/saml1-assertion-authzdecision.xml");
+
+ SAMLParser parser = new SAMLParser();
+ SAML11AssertionType assertion = (SAML11AssertionType) parser.parse(configStream);
+ assertNotNull(assertion);
+
+ //Validate assertion
+ assertEquals(1, assertion.getMajorVersion());
+ assertEquals(1, assertion.getMinorVersion());
+ assertEquals("buGxcG4gILg5NlocyLccDz6iXrUb", assertion.getID());
+ assertEquals("https://idp.example.org/saml", assertion.getIssuer());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:37.795Z"), assertion.getIssueInstant());
+
+ SAML11ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:37.795Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:15:37.795Z"), conditions.getNotOnOrAfter());
+ }
+
+ @Test
+ public void testSAML11AssertionWithAuthAndAuthz() throws Exception
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream configStream = tcl.getResourceAsStream("parser/saml1/saml1-assertion-auth-authz.xml");
+
+ SAMLParser parser = new SAMLParser();
+ SAML11AssertionType assertion = (SAML11AssertionType) parser.parse(configStream);
+ assertNotNull(assertion);
+
+ //Validate assertion
+ assertEquals(1, assertion.getMajorVersion());
+ assertEquals(1, assertion.getMinorVersion());
+ assertEquals("_e5c23ff7a3889e12fa01802a47331653", assertion.getID());
+ assertEquals("localhost", assertion.getIssuer());
+ assertEquals(XMLTimeUtil.parse("2008-12-10T14:12:14.817Z"), assertion.getIssueInstant());
+
+ SAML11ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2008-12-10T14:12:14.817Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2008-12-10T14:12:44.817Z"), conditions.getNotOnOrAfter());
+ List<SAML11ConditionAbstractType> theConditions = conditions.get();
+ assertEquals(1, theConditions.size());
+ SAML11AudienceRestrictionCondition restrictCond = (SAML11AudienceRestrictionCondition) theConditions.get(0);
+ assertEquals("https://some-service.example.com/app/", restrictCond.get().get(0).toString());
+
+ List<SAML11StatementAbstractType> statements = assertion.getStatements();
+ assertEquals(2, statements.size());
+
+ SAML11AttributeStatementType attrStat = (SAML11AttributeStatementType) statements.get(0);
+ SAML11SubjectType subject = attrStat.getSubject();
+ SAML11SubjectTypeChoice choice = subject.getChoice();
+ SAML11NameIdentifierType nameID = choice.getNameID();
+ assertEquals("johnq", nameID.getValue());
+ SAML11SubjectConfirmationType subjConf = subject.getSubjectConfirmation();
+ URI confirmationMethod = subjConf.getConfirmationMethod().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:cm:artifact", confirmationMethod.toString());
+
+ List<SAML11AttributeType> attributes = attrStat.get();
+ assertEquals(4, attributes.size());
+ SAML11AttributeType attr = attributes.get(0);
+ assertEquals("uid", attr.getAttributeName());
+ assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("12345", attr.get().get(0));
+
+ attr = attributes.get(1);
+ assertEquals("groupMembership", attr.getAttributeName());
+ assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("uugid=middleware.staff,ou=Groups,dc=vt,dc=edu", attr.get().get(0));
+
+ attr = attributes.get(2);
+ assertEquals("eduPersonAffiliation", attr.getAttributeName());
+ assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("staff", attr.get().get(0));
+
+ attr = attributes.get(3);
+ assertEquals("accountState", attr.getAttributeName());
+ assertEquals("http://www.ja-sig.org/products/cas/", attr.getAttributeNamespace().toString());
+ assertEquals("ACTIVE", attr.get().get(0));
+
+ SAML11AuthenticationStatementType authStat = (SAML11AuthenticationStatementType) statements.get(1);
+ assertEquals(XMLTimeUtil.parse("2008-12-10T14:12:14.741Z"), authStat.getAuthenticationInstant());
+ assertEquals("urn:oasis:names:tc:SAML:1.0:am:password", authStat.getAuthenticationMethod().toString());
+ subject = authStat.getSubject();
+ choice = subject.getChoice();
+ nameID = choice.getNameID();
+ assertEquals("johnq", nameID.getValue());
+ subjConf = subject.getSubjectConfirmation();
+ confirmationMethod = subjConf.getConfirmationMethod().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:cm:artifact", confirmationMethod.toString());
+ }
}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-auth-authz.xml 2011-06-23 19:58:53 UTC (rev 1026)
@@ -0,0 +1,51 @@
+<Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
+ AssertionID="_e5c23ff7a3889e12fa01802a47331653" IssueInstant="2008-12-10T14:12:14.817Z"
+ Issuer="localhost" MajorVersion="1" MinorVersion="1">
+ <Conditions NotBefore="2008-12-10T14:12:14.817Z"
+ NotOnOrAfter="2008-12-10T14:12:44.817Z">
+ <AudienceRestrictionCondition>
+ <Audience>
+ https://some-service.example.com/app/
+ </Audience>
+ </AudienceRestrictionCondition>
+ </Conditions>
+ <AttributeStatement>
+ <Subject>
+ <NameIdentifier>johnq</NameIdentifier>
+ <SubjectConfirmation>
+ <ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:artifact
+ </ConfirmationMethod>
+ </SubjectConfirmation>
+ </Subject>
+ <Attribute AttributeName="uid"
+ AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ <AttributeValue>12345</AttributeValue>
+ </Attribute>
+ <Attribute AttributeName="groupMembership"
+ AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ <AttributeValue>
+ uugid=middleware.staff,ou=Groups,dc=vt,dc=edu
+ </AttributeValue>
+ </Attribute>
+ <Attribute AttributeName="eduPersonAffiliation"
+ AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ <AttributeValue>staff</AttributeValue>
+ </Attribute>
+ <Attribute AttributeName="accountState"
+ AttributeNamespace="http://www.ja-sig.org/products/cas/">
+ <AttributeValue>ACTIVE</AttributeValue>
+ </Attribute>
+ </AttributeStatement>
+ <AuthenticationStatement AuthenticationInstant="2008-12-10T14:12:14.741Z"
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
+ <Subject>
+ <NameIdentifier>johnq</NameIdentifier>
+ <SubjectConfirmation>
+ <ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:artifact
+ </ConfirmationMethod>
+ </SubjectConfirmation>
+ </Subject>
+ </AuthenticationStatement>
+</Assertion>
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-authzdecision.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-authzdecision.xml (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-authzdecision.xml 2011-06-23 19:58:53 UTC (rev 1026)
@@ -0,0 +1,24 @@
+<saml:Assertion
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ MajorVersion="1" MinorVersion="1"
+ Issuer="https://idp.example.org/saml"
+ AssertionID="buGxcG4gILg5NlocyLccDz6iXrUb"
+ IssueInstant="2002-06-19T17:05:37.795Z">
+ <saml:Conditions NotBefore="2002-06-19T17:05:37.795Z" NotOnOrAfter="2002-06-19T17:15:37.795Z"/>
+ <saml:AuthorizationDecisionStatement
+ Decision="Permit"
+ Resource="https://sp.example.com/confidential_report.html">
+ <saml:Subject>
+ <saml:NameIdentifier
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
+ user(a)idp.example.org
+ </saml:NameIdentifier>
+ <saml:SubjectConfirmation>
+ <saml:ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:bearer
+ </saml:ConfirmationMethod>
+ </saml:SubjectConfirmation>
+ </saml:Subject>
+ <saml:Action>read</saml:Action>
+ </saml:AuthorizationDecisionStatement>
+ </saml:Assertion>
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -34,6 +34,8 @@
protected String namespace;
+ protected String value;
+
/**
* Gets the value of the namespace property.
*
@@ -59,4 +61,14 @@
{
this.namespace = value;
}
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -44,7 +44,7 @@
* @author Anil.Saldhana(a)redhat.com
* @since Jun 22, 2011
*/
-public class SAML11AuthorizationDecisionStatementType extends SAML11StatementAbstractType
+public class SAML11AuthorizationDecisionStatementType extends SAML11SubjectStatementType
{
private static final long serialVersionUID = 1L;
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -22,6 +22,7 @@
package org.picketlink.identity.federation.saml.v1.assertion;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.picketlink.identity.federation.saml.common.CommonConditionsType;
@@ -59,4 +60,9 @@
{
return this.conditions.remove(condition);
}
+
+ public List<SAML11ConditionAbstractType> get()
+ {
+ return Collections.unmodifiableList(conditions);
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java 2011-06-23 15:11:07 UTC (rev 1025)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java 2011-06-23 19:58:53 UTC (rev 1026)
@@ -44,6 +44,8 @@
protected URI format;
+ protected String value;
+
public String getNameQualifier()
{
return nameQualifier;
@@ -63,4 +65,14 @@
{
this.format = format;
}
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
}
\ No newline at end of file
13 years, 6 months
Picketlink SVN: r1025 - in federation/trunk: picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util and 4 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-23 11:11:07 -0400 (Thu, 23 Jun 2011)
New Revision: 1025
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-attribstat.xml
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java
Log:
PLFED-189: more parsing
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -21,9 +21,6 @@
*/
package org.picketlink.identity.federation.core.parsers.saml;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLEventReader;
@@ -32,12 +29,11 @@
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
-import org.jboss.security.xacml.core.model.context.RequestType;
-import org.jboss.security.xacml.core.model.context.ResponseType;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
+import org.picketlink.identity.federation.core.parsers.util.SAML11ParserUtil;
import org.picketlink.identity.federation.core.parsers.util.SAMLParserUtil;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
@@ -47,6 +43,7 @@
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectStatementType;
@@ -187,6 +184,12 @@
SAML11AuthenticationStatementType authStat = SAMLParserUtil.parseAuthenticationStatement(xmlEventReader);
assertion.add(authStat);
}
+ else if (JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase(tag))
+ {
+ SAML11AttributeStatementType attributeStatementType = SAML11ParserUtil
+ .parseSAML11AttributeStatement(xmlEventReader);
+ assertion.add(attributeStatementType);
+ }
/*else if (JBossSAMLConstants.AUTHN_STATEMENT.get().equalsIgnoreCase(tag))
{
AuthnStatementType authnStatementType = SAMLParserUtil.parseAuthnStatement(xmlEventReader);
@@ -229,7 +232,7 @@
throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
}*/
else
- throw new RuntimeException("SAMLAssertionParser:: unknown: " + tag + "::location="
+ throw new RuntimeException("SAML11AssertionParser:: unknown: " + tag + "::location="
+ peekedElement.getLocation());
}
return assertion;
@@ -250,6 +253,8 @@
private SAML11AssertionType parseBaseAttributes(StartElement nextElement) throws ParsingException
{
Attribute idAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.ASSERTIONID));
+ if (idAttribute == null)
+ throw new ParsingException("Required attribute AssertionID missing");
String id = StaxParserUtil.getAttributeValue(idAttribute);
Attribute majVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MAJOR_VERSION));
@@ -266,46 +271,4 @@
return new SAML11AssertionType(id, issueInstant);
}
-
- @SuppressWarnings("unchecked")
- private ResponseType getXACMLResponse(XMLEventReader xmlEventReader) throws ParsingException
- {
- Element xacmlResponse = StaxParserUtil.getDOMElement(xmlEventReader);
- //xacml request
- String xacmlPath = "org.jboss.security.xacml.core.model.context";
- try
- {
- JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
- Unmarshaller un = jaxb.createUnmarshaller();
- un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
- JAXBElement<ResponseType> jaxbResponseType = (JAXBElement<ResponseType>) un.unmarshal(DocumentUtil
- .getNodeAsStream(xacmlResponse));
- return jaxbResponseType.getValue();
- }
- catch (Exception e)
- {
- throw new ParsingException(e);
- }
- }
-
- @SuppressWarnings("unchecked")
- private RequestType getXACMLRequest(XMLEventReader xmlEventReader) throws ParsingException
- {
- Element xacmlRequest = StaxParserUtil.getDOMElement(xmlEventReader);
- //xacml request
- String xacmlPath = "org.jboss.security.xacml.core.model.context";
- try
- {
- JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
- Unmarshaller un = jaxb.createUnmarshaller();
- un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
- JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal(DocumentUtil
- .getNodeAsStream(xacmlRequest));
- return jaxbRequestType.getValue();
- }
- catch (Exception e)
- {
- throw new ParsingException(e);
- }
- }
}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAML11ParserUtil.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.core.parsers.util;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.events.Attribute;
+import javax.xml.stream.events.EndElement;
+import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
+
+import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.parsers.saml.SAML11SubjectParser;
+import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+
+/**
+ * Utility for parsing SAML 1.1 payload
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 23, 2011
+ */
+public class SAML11ParserUtil
+{
+ /**
+ * Parse an {@code SAML11AttributeStatementType}
+ * @param xmlEventReader
+ * @return
+ * @throws ParsingException
+ */
+ public static SAML11AttributeStatementType parseSAML11AttributeStatement(XMLEventReader xmlEventReader)
+ throws ParsingException
+ {
+ SAML11AttributeStatementType attributeStatementType = new SAML11AttributeStatementType();
+
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String ATTRIBSTATEMT = JBossSAMLConstants.ATTRIBUTE_STATEMENT.get();
+ StaxParserUtil.validate(startElement, ATTRIBSTATEMT);
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, JBossSAMLConstants.ATTRIBUTE_STATEMENT.get());
+ break;
+ }
+ //Get the next start element
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ String tag = startElement.getName().getLocalPart();
+ if (JBossSAMLConstants.ATTRIBUTE.get().equals(tag))
+ {
+ SAML11AttributeType attribute = parseSAML11Attribute(xmlEventReader);
+ attributeStatementType.add(attribute);
+ }
+ else if (JBossSAMLConstants.SUBJECT.get().equals(tag))
+ {
+ SAML11SubjectParser parser = new SAML11SubjectParser();
+ SAML11SubjectType subject = (SAML11SubjectType) parser.parse(xmlEventReader);
+ attributeStatementType.setSubject(subject);
+ }
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::Location=" + startElement.getLocation());
+ }
+ return attributeStatementType;
+ }
+
+ /**
+ * Parse a {@link SAML11AttributeType}
+ * @param xmlEventReader
+ * @return
+ * @throws ParsingException
+ */
+ public static SAML11AttributeType parseSAML11Attribute(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, JBossSAMLConstants.ATTRIBUTE.get());
+ SAML11AttributeType attributeType = null;
+
+ Attribute name = startElement.getAttributeByName(new QName(SAML11Constants.ATTRIBUTE_NAME));
+ if (name == null)
+ throw new RuntimeException("Required attribute Name in Attribute");
+ String attribName = StaxParserUtil.getAttributeValue(name);
+
+ Attribute namesp = startElement.getAttributeByName(new QName(SAML11Constants.ATTRIBUTE_NAMESPACE));
+ if (namesp == null)
+ throw new RuntimeException("Required attribute Namespace in Attribute");
+ String attribNamespace = StaxParserUtil.getAttributeValue(namesp);
+
+ attributeType = new SAML11AttributeType(attribName, URI.create(attribNamespace));
+
+ attributeType.add(parseAttributeValue(xmlEventReader));
+
+ parseAttributeType(xmlEventReader, startElement, JBossSAMLConstants.ATTRIBUTE.get(), attributeType);
+ return attributeType;
+ }
+
+ /**
+ * Parse an {@code SAML11AttributeType}
+ * @param xmlEventReader
+ * @throws ParsingException
+ */
+ public static void parseAttributeType(XMLEventReader xmlEventReader, StartElement startElement, String rootTag,
+ SAML11AttributeType attributeType) throws ParsingException
+ {
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement end = StaxParserUtil.getNextEndElement(xmlEventReader);
+ if (StaxParserUtil.matches(end, rootTag))
+ break;
+ }
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
+ break;
+ String tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (JBossSAMLConstants.ATTRIBUTE.get().equals(tag))
+ break;
+
+ if (JBossSAMLConstants.ATTRIBUTE_VALUE.get().equals(tag))
+ {
+ Object attributeValue = parseAttributeValue(xmlEventReader);
+ attributeType.add(attributeValue);
+ }
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::Location=" + startElement.getLocation());
+ }
+ }
+
+ /**
+ * Parse Attribute value
+ * @param xmlEventReader
+ * @return
+ * @throws ParsingException
+ */
+ public static Object parseAttributeValue(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, JBossSAMLConstants.ATTRIBUTE_VALUE.get());
+
+ Attribute type = startElement.getAttributeByName(new QName(JBossSAMLURIConstants.XSI_NSURI.get(), "type", "xsi"));
+ if (type == null)
+ {
+ return StaxParserUtil.getElementText(xmlEventReader);
+ }
+
+ String typeValue = StaxParserUtil.getAttributeValue(type);
+ if (typeValue.contains(":string"))
+ {
+ return StaxParserUtil.getElementText(xmlEventReader);
+ }
+
+ throw new RuntimeException("Unsupported xsi:type=" + typeValue);
+ }
+}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -117,50 +117,6 @@
parseAttributeType(xmlEventReader, startElement, JBossSAMLConstants.ATTRIBUTE.get(), attributeType);
- /*//Look for X500 Encoding
- QName x500EncodingName = new QName( JBossSAMLURIConstants.X500_NSURI.get(),
- JBossSAMLConstants.ENCODING.get(), JBossSAMLURIConstants.X500_PREFIX.get() );
- Attribute x500EncodingAttr = startElement.getAttributeByName( x500EncodingName );
-
- if( x500EncodingAttr != null )
- {
- attributeType.getOtherAttributes().put( x500EncodingAttr.getName(), StaxParserUtil.getAttributeValue( x500EncodingAttr ));
- }
-
-
- Attribute friendlyName = startElement.getAttributeByName( new QName( JBossSAMLConstants.FRIENDLY_NAME.get() ));
- if( friendlyName != null )
- attributeType.setFriendlyName( StaxParserUtil.getAttributeValue( friendlyName ));
-
- Attribute nameFormat = startElement.getAttributeByName( new QName( JBossSAMLConstants.NAME_FORMAT.get() ));
- if( nameFormat != null )
- attributeType.setNameFormat( StaxParserUtil.getAttributeValue( nameFormat ));
-
- while( xmlEventReader.hasNext() )
- {
- XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
- if( xmlEvent instanceof EndElement )
- {
- EndElement end = StaxParserUtil.getNextEndElement(xmlEventReader);
- if( StaxParserUtil.matches( end, JBossSAMLConstants.ATTRIBUTE.get() ))
- break;
- }
- startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
- if( startElement == null )
- break;
- String tag = StaxParserUtil.getStartElementName(startElement);
-
- if( JBossSAMLConstants.ATTRIBUTE.get().equals( tag ))
- break;
-
- if( JBossSAMLConstants.ATTRIBUTE_VALUE.get().equals( tag ) )
- {
- Object attributeValue = parseAttributeValue(xmlEventReader);
- attributeType.addAttributeValue( attributeValue );
- }
- else throw new RuntimeException( "Unknown tag:" + tag );
- }*/
-
return attributeType;
}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -31,6 +31,10 @@
String ASSERTION_11_NSURI = "urn:oasis:names:tc:SAML:1.0:assertion";
+ String ATTRIBUTE_NAME = "AttributeName";
+
+ String ATTRIBUTE_NAMESPACE = "AttributeNamespace";
+
String AUTHENTICATION_INSTANT = "AuthenticationInstant";
String AUTHENTICATION_METHOD = "AuthenticationMethod";
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -23,14 +23,18 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import java.io.InputStream;
import java.net.URI;
+import java.util.List;
import org.junit.Test;
import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectConfirmationType;
@@ -77,4 +81,61 @@
URI confirmationMethod = subjectConfirm.getConfirmationMethod().get(0);
assertEquals("urn:oasis:names:tc:SAML:1.0:cm:bearer", confirmationMethod.toString());
}
+
+ @Test
+ public void testSAML11AssertionWithAttributeStatements() throws Exception
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream configStream = tcl.getResourceAsStream("parser/saml1/saml1-assertion-attribstat.xml");
+
+ SAMLParser parser = new SAMLParser();
+ SAML11AssertionType assertion = (SAML11AssertionType) parser.parse(configStream);
+ assertNotNull(assertion);
+
+ //Validate assertion
+ assertEquals(1, assertion.getMajorVersion());
+ assertEquals(1, assertion.getMinorVersion());
+ assertEquals("buGxcG4gILg5NlocyLccDz6iXrUb", assertion.getID());
+ assertEquals("https://idp.example.org/saml", assertion.getIssuer());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:37.795Z"), assertion.getIssueInstant());
+
+ SAML11ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:37.795Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:15:37.795Z"), conditions.getNotOnOrAfter());
+
+ SAML11AuthenticationStatementType stat = (SAML11AuthenticationStatementType) assertion.getStatements().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:am:password", stat.getAuthenticationMethod().toString());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:08:37.795Z"), stat.getAuthenticationInstant());
+
+ SAML11SubjectType subject = stat.getSubject();
+ SAML11SubjectType.SAML11SubjectTypeChoice choice = subject.getChoice();
+ assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
+
+ SAML11SubjectConfirmationType subjectConfirm = subject.getSubjectConfirmation();
+ URI confirmationMethod = subjectConfirm.getConfirmationMethod().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:cm:bearer", confirmationMethod.toString());
+
+ SAML11AttributeStatementType attribStat = (SAML11AttributeStatementType) assertion.getStatements().get(1);
+ assertNotNull(attribStat);
+ subject = attribStat.getSubject();
+
+ choice = subject.getChoice();
+ assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
+
+ subjectConfirm = subject.getSubjectConfirmation();
+ confirmationMethod = subjectConfirm.getConfirmationMethod().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:cm:bearer", confirmationMethod.toString());
+
+ List<SAML11AttributeType> attribs = attribStat.get();
+ assertEquals(1, attribs.size());
+ SAML11AttributeType attrib = attribs.get(0);
+ assertEquals("urn:mace:dir:attribute-def:eduPersonAffiliation", attrib.getAttributeName());
+ assertEquals("urn:mace:shibboleth:1.0:attributeNamespace:uri", attrib.getAttributeNamespace().toString());
+
+ List<Object> attribValues = attrib.get();
+ assertTrue(attribValues.contains("member"));
+ assertTrue(attribValues.contains("student"));
+ }
}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-attribstat.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-attribstat.xml (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion-attribstat.xml 2011-06-23 15:11:07 UTC (rev 1025)
@@ -0,0 +1,42 @@
+<saml:Assertion
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ MajorVersion="1" MinorVersion="1"
+ Issuer="https://idp.example.org/saml"
+ AssertionID="buGxcG4gILg5NlocyLccDz6iXrUb"
+ IssueInstant="2002-06-19T17:05:37.795Z">
+ <saml:Conditions NotBefore="2002-06-19T17:05:37.795Z" NotOnOrAfter="2002-06-19T17:15:37.795Z"/>
+ <saml:AuthenticationStatement
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password"
+ AuthenticationInstant="2002-06-19T17:08:37.795Z">
+ <saml:Subject>
+ <saml:NameIdentifier
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
+ user(a)idp.example.org
+ </saml:NameIdentifier>
+ <saml:SubjectConfirmation>
+ <saml:ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:bearer
+ </saml:ConfirmationMethod>
+ </saml:SubjectConfirmation>
+ </saml:Subject>
+ </saml:AuthenticationStatement>
+ <saml:AttributeStatement>
+ <saml:Subject>
+ <saml:NameIdentifier
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
+ user(a)idp.example.org
+ </saml:NameIdentifier>
+ <saml:SubjectConfirmation>
+ <saml:ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:bearer
+ </saml:ConfirmationMethod>
+ </saml:SubjectConfirmation>
+ </saml:Subject>
+ <saml:Attribute
+ AttributeName="urn:mace:dir:attribute-def:eduPersonAffiliation"
+ AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri">
+ <saml:AttributeValue>member</saml:AttributeValue>
+ <saml:AttributeValue>student</saml:AttributeValue>
+ </saml:Attribute>
+ </saml:AttributeStatement>
+ </saml:Assertion>
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -46,19 +46,19 @@
protected List<SAML11AttributeType> attribute = new ArrayList<SAML11AttributeType>();
- public void add(SAML11AttributeType statement)
+ public void add(SAML11AttributeType aAttribute)
{
- this.attribute.add(statement);
+ this.attribute.add(aAttribute);
}
- public void addAllStatements(List<SAML11AttributeType> statement)
+ public void addAllAttributes(List<SAML11AttributeType> attribList)
{
- this.attribute.addAll(statement);
+ this.attribute.addAll(attribList);
}
- public boolean remove(SAML11AttributeType statement)
+ public boolean remove(SAML11AttributeType anAttrib)
{
- return this.attribute.remove(statement);
+ return this.attribute.remove(anAttrib);
}
public List<SAML11AttributeType> get()
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -49,19 +49,19 @@
super(attributeName, attributeNamespace);
}
- public void add(Object advice)
+ public void add(Object attribValue)
{
- this.attributeValues.add(advice);
+ this.attributeValues.add(attribValue);
}
- public void addAll(List<Object> advice)
+ public void addAll(List<Object> attribValueList)
{
- this.attributeValues.addAll(advice);
+ this.attributeValues.addAll(attribValueList);
}
- public boolean remove(Object advice)
+ public boolean remove(Object attribVal)
{
- return this.attributeValues.remove(advice);
+ return this.attributeValues.remove(attribVal);
}
public List<Object> get()
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java 2011-06-23 01:06:53 UTC (rev 1024)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java 2011-06-23 15:11:07 UTC (rev 1025)
@@ -42,6 +42,15 @@
protected SAML11SubjectType subject;
+ public SAML11SubjectStatementType()
+ {
+ }
+
+ public SAML11SubjectStatementType(SAML11SubjectType subject)
+ {
+ this.subject = subject;
+ }
+
public SAML11SubjectType getSubject()
{
return subject;
13 years, 6 months
Picketlink SVN: r1024 - in federation/trunk: picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/request and 6 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-22 21:06:53 -0400 (Wed, 22 Jun 2011)
New Revision: 1024
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
Modified:
federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java
federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/request/SAML2Request.java
federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/response/SAML2Response.java
federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2LogOutHandler.java
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/IDPWebRequestUtil.java
federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java
Log:
PLFED-189: saml 1.1
Modified: federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -33,16 +33,15 @@
import org.picketlink.identity.federation.bindings.jboss.auth.SAML20TokenRoleAttributeProvider;
import org.picketlink.identity.federation.bindings.jboss.auth.mapping.STSGroupMappingProvider;
import org.picketlink.identity.federation.bindings.jboss.auth.mapping.STSPrincipalMappingProvider;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.core.wstrust.auth.AbstractSTSLoginModule;
import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
-import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType.STSubType;
import org.w3c.dom.Element;
@@ -74,20 +73,20 @@
String roleAttributeName = "roleAttributeName";
String role1 = "userRole1";
String role2 = "userRole2";
-
- AssertionType assertion = new AssertionType( "ID_SOME", XMLTimeUtil.getIssueInstant(), JBossSAMLConstants.VERSION_2_0.get());
+
+ AssertionType assertion = new AssertionType("ID_SOME", XMLTimeUtil.getIssueInstant());
AttributeStatementType attributeStatementType = new AttributeStatementType();
- assertion.addStatement( attributeStatementType );
- AttributeType attributeType = new AttributeType( roleAttributeName );
- attributeStatementType.addAttribute( new ASTChoiceType(attributeType));
- attributeType.addAttributeValue( role1 );
- attributeType.addAttributeValue( role2 );
-
+ assertion.addStatement(attributeStatementType);
+ AttributeType attributeType = new AttributeType(roleAttributeName);
+ attributeStatementType.addAttribute(new ASTChoiceType(attributeType));
+ attributeType.addAttributeValue(role1);
+ attributeType.addAttributeValue(role2);
+
MappingResult<RoleGroup> mappingResult = new MappingResult<RoleGroup>();
Map<String, Object> contextMap = new HashMap<String, Object>();
contextMap.put("token-role-attribute-name", roleAttributeName);
contextMap.put(AbstractSTSLoginModule.SHARED_TOKEN, SAMLUtil.toElement(assertion));
-
+
MappingProvider<RoleGroup> mappingProvider = new STSGroupMappingProvider();
mappingProvider.init(contextMap);
mappingProvider.setMappingResult(mappingResult);
@@ -95,7 +94,8 @@
RoleGroup roleGroup = mappingResult.getMappedObject();
assertNotNull("Unexpected null mapped role", roleGroup);
- assertEquals("RoleGroup name has unexpected value", SAML20TokenRoleAttributeProvider.JBOSS_ROLE_PRINCIPAL_NAME, roleGroup.getRoleName());
+ assertEquals("RoleGroup name has unexpected value", SAML20TokenRoleAttributeProvider.JBOSS_ROLE_PRINCIPAL_NAME,
+ roleGroup.getRoleName());
assertEquals("RoleGroup has unexpected first role", role1, roleGroup.getRoles().get(0).getRoleName());
assertEquals("RoleGroup has unexpected second role", role2, roleGroup.getRoles().get(1).getRoleName());
}
@@ -110,25 +110,25 @@
public void testSTSPrincipalMappingProvider() throws Exception
{
String userId = "babak";
-
- AssertionType assertion = new AssertionType( "ID_SOME", XMLTimeUtil.getIssueInstant(), JBossSAMLConstants.VERSION_2_0.get() );
+
+ AssertionType assertion = new AssertionType("ID_SOME", XMLTimeUtil.getIssueInstant());
SubjectType subjectType = new SubjectType();
assertion.setSubject(subjectType);
//QName name = new QName(WSTrustConstants.SAML2_ASSERTION_NS, "NameID");
NameIDType nameIDType = new NameIDType();
nameIDType.setValue(userId);
STSubType subType = new STSubType();
- subType.addBaseID( nameIDType );
-
- subjectType.setSubType( subType );
+ subType.addBaseID(nameIDType);
+
+ subjectType.setSubType(subType);
/*JAXBElement<NameIDType> jaxbElement = new JAXBElement<NameIDType>(name, declaredType, JAXBElement.GlobalScope.class, nameIDType);
subjectType.getContent().add(jaxbElement);*/
-
+
MappingResult<Principal> mappingResult = new MappingResult<Principal>();
Map<String, Object> contextMap = new HashMap<String, Object>();
Element assertionElement = SAMLUtil.toElement(assertion);
contextMap.put(AbstractSTSLoginModule.SHARED_TOKEN, assertionElement);
-
+
MappingProvider<Principal> mappingProvider = new STSPrincipalMappingProvider();
mappingProvider.init(contextMap);
mappingProvider.setMappingResult(mappingResult);
Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/request/SAML2Request.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/request/SAML2Request.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/request/SAML2Request.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -89,8 +89,7 @@
{
XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
- String version = JBossSAMLConstants.VERSION_2_0.get();
- AuthnRequestType authnRequest = new AuthnRequestType(id, version, issueInstant);
+ AuthnRequestType authnRequest = new AuthnRequestType(id, issueInstant);
authnRequest.setAssertionConsumerServiceURL(URI.create(assertionConsumerURL));
authnRequest.setProtocolBinding(URI.create(JBossSAMLConstants.HTTP_POST_BINDING.get()));
if (destination != null)
@@ -221,8 +220,7 @@
*/
public LogoutRequestType createLogoutRequest(String issuer) throws ConfigurationException
{
- LogoutRequestType lrt = new LogoutRequestType(IDGenerator.create("ID_"), JBossSAMLConstants.VERSION_2_0.get(),
- XMLTimeUtil.getIssueInstant());
+ LogoutRequestType lrt = new LogoutRequestType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant());
//Create an issuer
NameIDType issuerNameID = new NameIDType();
Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/response/SAML2Response.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/response/SAML2Response.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/saml/v2/response/SAML2Response.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -218,9 +218,16 @@
* Create an empty response type
* @return
*/
- public ResponseType createResponseType()
+ public ResponseType createResponseType(String ID)
{
- return JBossSAMLAuthnResponseFactory.createResponseType();
+ try
+ {
+ return new ResponseType(ID, XMLTimeUtil.getIssueInstant());
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException(e);
+ }
}
/**
Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/soap/SOAPSAMLXACML.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -87,8 +87,7 @@
{
String id = IDGenerator.create("ID_");
- XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id,
- JBossSAMLConstants.VERSION_2_0.get(), XMLTimeUtil.getIssueInstant());
+ XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id, XMLTimeUtil.getIssueInstant());
queryType.setRequest(xacmlRequest);
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11AssertionParser.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -0,0 +1,311 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.core.parsers.saml;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.events.Attribute;
+import javax.xml.stream.events.EndElement;
+import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
+
+import org.jboss.security.xacml.core.model.context.RequestType;
+import org.jboss.security.xacml.core.model.context.ResponseType;
+import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
+import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.exceptions.ProcessingException;
+import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
+import org.picketlink.identity.federation.core.parsers.util.SAMLParserUtil;
+import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
+import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.util.StringUtil;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+import org.w3c.dom.Element;
+
+/**
+ * Parse the saml assertion
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Oct 12, 2010
+ */
+public class SAML11AssertionParser implements ParserNamespaceSupport
+{
+ private final String ASSERTION = JBossSAMLConstants.ASSERTION.get();
+
+ public SAML11AssertionType fromElement(Element element) throws ConfigurationException, ProcessingException,
+ ParsingException
+ {
+ XMLEventReader xmlEventReader = StaxParserUtil.getXMLEventReader(DocumentUtil.getNodeAsStream(element));
+ return (SAML11AssertionType) parse(xmlEventReader);
+ }
+
+ /**
+ * @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
+ */
+ public Object parse(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+
+ //Special case: Encrypted Assertion
+ StaxParserUtil.validate(startElement, ASSERTION);
+ SAML11AssertionType assertion = parseBaseAttributes(startElement);
+
+ Attribute issuerAttribute = startElement.getAttributeByName(new QName(SAML11Constants.ISSUER));
+ String issuer = StaxParserUtil.getAttributeValue(issuerAttribute);
+ assertion.setIssuer(issuer);
+
+ //Peek at the next event
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
+ break;
+
+ if (xmlEvent instanceof EndElement)
+ {
+ xmlEvent = StaxParserUtil.getNextEvent(xmlEventReader);
+ EndElement endElement = (EndElement) xmlEvent;
+ String endElementTag = StaxParserUtil.getEndElementName(endElement);
+ if (endElementTag.equals(JBossSAMLConstants.ASSERTION.get()))
+ break;
+ else
+ throw new RuntimeException("Unknown End Element:" + endElementTag);
+ }
+
+ StartElement peekedElement = null;
+
+ if (xmlEvent instanceof StartElement)
+ {
+ peekedElement = (StartElement) xmlEvent;
+ }
+ else
+ {
+ peekedElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ }
+ if (peekedElement == null)
+ break;
+
+ String tag = StaxParserUtil.getStartElementName(peekedElement);
+
+ if (tag.equals(JBossSAMLConstants.SIGNATURE.get()))
+ {
+ assertion.setSignature(StaxParserUtil.getDOMElement(xmlEventReader));
+ continue;
+ }
+
+ if (JBossSAMLConstants.ISSUER.get().equalsIgnoreCase(tag))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ issuer = StaxParserUtil.getElementText(xmlEventReader);
+
+ assertion.setIssuer(issuer);
+ }
+ else if (JBossSAMLConstants.SUBJECT.get().equalsIgnoreCase(tag))
+ {
+ SAML11SubjectParser subjectParser = new SAML11SubjectParser();
+ SAML11SubjectType subject = (SAML11SubjectType) subjectParser.parse(xmlEventReader);
+ SAML11SubjectStatementType subStat = new SAML11SubjectStatementType();
+ subStat.setSubject(subject);
+ }
+ else if (JBossSAMLConstants.CONDITIONS.get().equalsIgnoreCase(tag))
+ {
+ startElement = (StartElement) xmlEvent;
+ SAML11ConditionsType conditions = new SAML11ConditionsType();
+ assertion.setConditions(conditions);
+
+ StartElement conditionsElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(conditionsElement, JBossSAMLConstants.CONDITIONS.get());
+
+ String assertionNS = SAML11Constants.ASSERTION_11_NSURI;
+
+ QName notBeforeQName = new QName("", JBossSAMLConstants.NOT_BEFORE.get());
+ QName notBeforeQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_BEFORE.get());
+
+ QName notAfterQName = new QName("", JBossSAMLConstants.NOT_ON_OR_AFTER.get());
+ QName notAfterQNameWithNS = new QName(assertionNS, JBossSAMLConstants.NOT_ON_OR_AFTER.get());
+
+ Attribute notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQName);
+ if (notBeforeAttribute == null)
+ notBeforeAttribute = conditionsElement.getAttributeByName(notBeforeQNameWithNS);
+
+ Attribute notAfterAttribute = conditionsElement.getAttributeByName(notAfterQName);
+ if (notAfterAttribute == null)
+ notAfterAttribute = conditionsElement.getAttributeByName(notAfterQNameWithNS);
+
+ if (notBeforeAttribute != null)
+ {
+ String notBeforeValue = StaxParserUtil.getAttributeValue(notBeforeAttribute);
+ conditions.setNotBefore(XMLTimeUtil.parse(notBeforeValue));
+ }
+
+ if (notAfterAttribute != null)
+ {
+ String notAfterValue = StaxParserUtil.getAttributeValue(notAfterAttribute);
+ conditions.setNotOnOrAfter(XMLTimeUtil.parse(notAfterValue));
+ }
+
+ assertion.setConditions(conditions);
+
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, JBossSAMLConstants.CONDITIONS.get());
+ }
+ else if (SAML11Constants.AUTHENTICATION_STATEMENT.equals(tag))
+ {
+ startElement = (StartElement) xmlEvent;
+ SAML11AuthenticationStatementType authStat = SAMLParserUtil.parseAuthenticationStatement(xmlEventReader);
+ assertion.add(authStat);
+ }
+ /*else if (JBossSAMLConstants.AUTHN_STATEMENT.get().equalsIgnoreCase(tag))
+ {
+ AuthnStatementType authnStatementType = SAMLParserUtil.parseAuthnStatement(xmlEventReader);
+ assertion.addStatement(authnStatementType);
+ }
+ else if (JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase(tag))
+ {
+ AttributeStatementType attributeStatementType = SAMLParserUtil.parseAttributeStatement(xmlEventReader);
+ assertion.addStatement(attributeStatementType);
+ }
+ else if (JBossSAMLConstants.STATEMENT.get().equalsIgnoreCase(tag))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+
+ String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
+ if (xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_STATEMENT_TYPE.get()))
+ {
+ XACMLAuthzDecisionStatementType authZStat = new XACMLAuthzDecisionStatementType();
+
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (tag.contains(JBossSAMLConstants.RESPONSE.get()))
+ {
+ authZStat.setResponse(getXACMLResponse(xmlEventReader));
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ //There may be request also
+ tag = StaxParserUtil.getStartElementName(startElement);
+ if (tag.contains(JBossSAMLConstants.REQUEST.get()))
+ {
+ authZStat.setRequest(getXACMLRequest(xmlEventReader));
+ }
+ }
+
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, JBossSAMLConstants.STATEMENT.get());
+ assertion.addStatement(authZStat);
+ }
+ else
+ throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
+ }*/
+ else
+ throw new RuntimeException("SAMLAssertionParser:: unknown: " + tag + "::location="
+ + peekedElement.getLocation());
+ }
+ return assertion;
+ }
+
+ /**
+ * @see {@link ParserNamespaceSupport#supports(QName)}
+ */
+ public boolean supports(QName qname)
+ {
+ String nsURI = qname.getNamespaceURI();
+ String localPart = qname.getLocalPart();
+
+ return nsURI.equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())
+ && localPart.equals(JBossSAMLConstants.ASSERTION.get());
+ }
+
+ private SAML11AssertionType parseBaseAttributes(StartElement nextElement) throws ParsingException
+ {
+ Attribute idAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.ASSERTIONID));
+ String id = StaxParserUtil.getAttributeValue(idAttribute);
+
+ Attribute majVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MAJOR_VERSION));
+ String majVersion = StaxParserUtil.getAttributeValue(majVersionAttribute);
+ StringUtil.match("1", majVersion);
+
+ Attribute minVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MAJOR_VERSION));
+ String minVersion = StaxParserUtil.getAttributeValue(minVersionAttribute);
+ StringUtil.match("1", minVersion);
+
+ Attribute issueInstantAttribute = nextElement
+ .getAttributeByName(new QName(JBossSAMLConstants.ISSUE_INSTANT.get()));
+ XMLGregorianCalendar issueInstant = XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstantAttribute));
+
+ return new SAML11AssertionType(id, issueInstant);
+ }
+
+ @SuppressWarnings("unchecked")
+ private ResponseType getXACMLResponse(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ Element xacmlResponse = StaxParserUtil.getDOMElement(xmlEventReader);
+ //xacml request
+ String xacmlPath = "org.jboss.security.xacml.core.model.context";
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
+ Unmarshaller un = jaxb.createUnmarshaller();
+ un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
+ JAXBElement<ResponseType> jaxbResponseType = (JAXBElement<ResponseType>) un.unmarshal(DocumentUtil
+ .getNodeAsStream(xacmlResponse));
+ return jaxbResponseType.getValue();
+ }
+ catch (Exception e)
+ {
+ throw new ParsingException(e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private RequestType getXACMLRequest(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ Element xacmlRequest = StaxParserUtil.getDOMElement(xmlEventReader);
+ //xacml request
+ String xacmlPath = "org.jboss.security.xacml.core.model.context";
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
+ Unmarshaller un = jaxb.createUnmarshaller();
+ un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
+ JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal(DocumentUtil
+ .getNodeAsStream(xacmlRequest));
+ return jaxbRequestType.getValue();
+ }
+ catch (Exception e)
+ {
+ throw new ParsingException(e);
+ }
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2LogOutHandler.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2LogOutHandler.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2LogOutHandler.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -36,17 +36,17 @@
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.saml.v2.common.IDGenerator;
import org.picketlink.identity.federation.core.saml.v2.common.SAMLProtocolContext;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2Handler;
import org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerRequest;
import org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerRequest.GENERATE_REQUEST_TYPE;
import org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerResponse;
-import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS;
-import org.picketlink.identity.federation.saml.v2.SAML2Object;
+import org.picketlink.identity.federation.saml.v2.SAML2Object;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.protocol.LogoutRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusCodeType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
@@ -61,32 +61,33 @@
* @since Sep 17, 2009
*/
public class SAML2LogOutHandler extends BaseSAML2Handler
-{
+{
private static Logger log = Logger.getLogger(SAML2LogOutHandler.class);
- private boolean trace = log.isTraceEnabled();
-
- private IDPLogOutHandler idp = new IDPLogOutHandler();
- private SPLogOutHandler sp = new SPLogOutHandler();
-
+
+ private final boolean trace = log.isTraceEnabled();
+
+ private final IDPLogOutHandler idp = new IDPLogOutHandler();
+
+ private final SPLogOutHandler sp = new SPLogOutHandler();
+
/**
* @see SAML2Handler#generateSAMLRequest(SAML2HandlerRequest, SAML2HandlerResponse)
*/
public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response)
throws ProcessingException
{
- if(request.getTypeOfRequestToBeGenerated() == null)
+ if (request.getTypeOfRequestToBeGenerated() == null)
{
- if(trace)
+ if (trace)
{
log.trace("Request type to be generated=null");
}
return;
}
- if(GENERATE_REQUEST_TYPE.LOGOUT != request.getTypeOfRequestToBeGenerated())
+ if (GENERATE_REQUEST_TYPE.LOGOUT != request.getTypeOfRequestToBeGenerated())
return;
-
-
- if(getType() == HANDLER_TYPE.IDP)
+
+ if (getType() == HANDLER_TYPE.IDP)
{
idp.generateSAMLRequest(request, response);
}
@@ -95,398 +96,383 @@
sp.generateSAMLRequest(request, response);
}
}
-
+
/**
* @see SAML2Handler#handleRequestType(RequestAbstractType)
*/
- public void handleRequestType(SAML2HandlerRequest request,
- SAML2HandlerResponse response) throws ProcessingException
- {
- if(request.getSAML2Object() instanceof LogoutRequestType == false)
- return ;
-
- if(getType() == HANDLER_TYPE.IDP)
+ public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException
+ {
+ if (request.getSAML2Object() instanceof LogoutRequestType == false)
+ return;
+
+ if (getType() == HANDLER_TYPE.IDP)
{
idp.handleRequestType(request, response);
}
else
{
sp.handleRequestType(request, response);
- }
+ }
}
/**
* @see SAML2Handler#handleStatusResponseType(StatusResponseType,
Document resultingDocument)
*/
- public void handleStatusResponseType(SAML2HandlerRequest request,
- SAML2HandlerResponse response) throws ProcessingException
+ public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
{
//we do not handle any ResponseType (authentication etc)
- if(request.getSAML2Object() instanceof ResponseType)
+ if (request.getSAML2Object() instanceof ResponseType)
return;
-
- if(request.getSAML2Object() instanceof StatusResponseType == false)
- return ;
-
- if(getType() == HANDLER_TYPE.IDP)
+
+ if (request.getSAML2Object() instanceof StatusResponseType == false)
+ return;
+
+ if (getType() == HANDLER_TYPE.IDP)
{
idp.handleStatusResponseType(request, response);
}
else
{
sp.handleStatusResponseType(request, response);
- }
+ }
}
-
+
private class IDPLogOutHandler
{
- public void generateSAMLRequest(SAML2HandlerRequest request,
- SAML2HandlerResponse response) throws ProcessingException
+ public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
{
-
+
}
-
-
- public void handleStatusResponseType( SAML2HandlerRequest request,
- SAML2HandlerResponse response ) throws ProcessingException
- {
+
+ public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
+ {
//we got a logout response from a SP
SAML2Object samlObject = request.getSAML2Object();
StatusResponseType statusResponseType = (StatusResponseType) samlObject;
-
+
HTTPContext httpContext = (HTTPContext) request.getContext();
HttpServletRequest httpRequest = httpContext.getRequest();
HttpSession httpSession = httpRequest.getSession(false);
-
+
String relayState = request.getRelayState();
-
+
ServletContext servletCtx = httpContext.getServletContext();
- IdentityServer server = (IdentityServer)servletCtx.getAttribute("IDENTITY_SERVER");
-
- if(server == null)
+ IdentityServer server = (IdentityServer) servletCtx.getAttribute("IDENTITY_SERVER");
+
+ if (server == null)
throw new ProcessingException("Identity Server not found");
-
+
String sessionID = httpSession.getId();
-
+
String statusIssuer = statusResponseType.getIssuer().getValue();
server.stack().deRegisterTransitParticipant(sessionID, statusIssuer);
-
+
String nextParticipant = this.getParticipant(server, sessionID, relayState);
- if(nextParticipant == null || nextParticipant.equals(relayState))
+ if (nextParticipant == null || nextParticipant.equals(relayState))
{
//we are done with logout - First ask STS to cancel the token
- AssertionType assertion = (AssertionType) httpSession.getAttribute( GeneralConstants.ASSERTION );
- if( assertion != null )
+ AssertionType assertion = (AssertionType) httpSession.getAttribute(GeneralConstants.ASSERTION);
+ if (assertion != null)
{
PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
- SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
- samlProtocolContext.setIssuedAssertion( assertion );
- sts.cancelToken(samlProtocolContext);
- httpSession.removeAttribute( GeneralConstants.ASSERTION );
+ SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
+ samlProtocolContext.setIssuedAssertion(assertion);
+ sts.cancelToken(samlProtocolContext);
+ httpSession.removeAttribute(GeneralConstants.ASSERTION);
}
-
+
//TODO: check the in transit map for partial logouts
try
{
- generateSuccessStatusResponseType(statusResponseType.getInResponseTo(),
- request, response, relayState);
- Boolean isPost = server.stack().getBinding( relayState );
- if( isPost == null )
+ generateSuccessStatusResponseType(statusResponseType.getInResponseTo(), request, response, relayState);
+ Boolean isPost = server.stack().getBinding(relayState);
+ if (isPost == null)
isPost = Boolean.TRUE;
- response.setPostBindingForResponse( isPost.booleanValue() );
+ response.setPostBindingForResponse(isPost.booleanValue());
}
catch (Exception e)
{
throw new ProcessingException(e);
}
-
+
httpSession.invalidate(); //We are done with the logout interaction
}
else
{
//Put the participant in transit mode
server.stack().registerTransitParticipant(sessionID, nextParticipant);
- Boolean isPost = server.stack().getBinding( nextParticipant );
- if( isPost == null )
+ Boolean isPost = server.stack().getBinding(nextParticipant);
+ if (isPost == null)
isPost = Boolean.TRUE;
- response.setPostBindingForResponse( isPost.booleanValue() );
-
+ response.setPostBindingForResponse(isPost.booleanValue());
+
//send logout request to participant with relaystate to orig
response.setRelayState(relayState);
-
+
response.setDestination(nextParticipant);
-
+
SAML2Request saml2Request = new SAML2Request();
try
{
LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
- response.setResultingDocument(saml2Request.convert(lort));
+ response.setResultingDocument(saml2Request.convert(lort));
response.setSendRequest(true);
}
- catch(Exception e)
+ catch (Exception e)
{
throw new ProcessingException(e);
}
}
}
-
- public void handleRequestType( SAML2HandlerRequest request,
- SAML2HandlerResponse response ) throws ProcessingException
+
+ public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
{
HTTPContext httpContext = (HTTPContext) request.getContext();
HttpSession session = httpContext.getRequest().getSession(false);
String sessionID = session.getId();
-
+
String relayState = httpContext.getRequest().getParameter(GeneralConstants.RELAY_STATE);
-
+
LogoutRequestType logOutRequest = (LogoutRequestType) request.getSAML2Object();
String issuer = logOutRequest.getIssuer().getValue();
try
- {
+ {
SAML2Request saml2Request = new SAML2Request();
-
+
ServletContext servletCtx = httpContext.getServletContext();
- IdentityServer server = (IdentityServer)servletCtx.getAttribute(GeneralConstants.IDENTITY_SERVER);
-
- if(server == null)
+ IdentityServer server = (IdentityServer) servletCtx.getAttribute(GeneralConstants.IDENTITY_SERVER);
+
+ if (server == null)
throw new ProcessingException("Identity Server not found");
-
+
String originalIssuer = (relayState == null) ? issuer : relayState;
-
+
String participant = this.getParticipant(server, sessionID, originalIssuer);
-
- if(participant == null || participant.equals(originalIssuer))
+
+ if (participant == null || participant.equals(originalIssuer))
{
//All log out is done
session.invalidate();
server.stack().pop(sessionID);
-
- Boolean isPost = server.stack().getBinding( participant );
- if( isPost == null )
+
+ Boolean isPost = server.stack().getBinding(participant);
+ if (isPost == null)
isPost = Boolean.TRUE;
-
- generateSuccessStatusResponseType(logOutRequest.getID(),
- request, response, originalIssuer);
- response.setPostBindingForResponse( isPost.booleanValue() );
+
+ generateSuccessStatusResponseType(logOutRequest.getID(), request, response, originalIssuer);
+ response.setPostBindingForResponse(isPost.booleanValue());
response.setSendRequest(false);
}
else
{
//Put the participant in transit mode
server.stack().registerTransitParticipant(sessionID, participant);
-
- if(relayState == null)
+
+ if (relayState == null)
relayState = originalIssuer;
-
+
//send logout request to participant with relaystate to orig
response.setRelayState(originalIssuer);
-
+
response.setDestination(participant);
-
+
Boolean isPost = server.stack().getBinding(participant);
- if( isPost == null )
+ if (isPost == null)
isPost = Boolean.TRUE;
-
- response.setPostBindingForResponse( isPost );
-
-
+
+ response.setPostBindingForResponse(isPost);
+
LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
long assertionValidity = (Long) request.getOptions().get(GeneralConstants.ASSERTIONS_VALIDITY);
-
+
lort.setNotOnOrAfter(XMLTimeUtil.add(lort.getIssueInstant(), assertionValidity));
- lort.setDestination( URI.create( participant ));
-
+ lort.setDestination(URI.create(participant));
+
response.setResultingDocument(saml2Request.convert(lort));
response.setSendRequest(true);
}
}
- catch(ParserConfigurationException pe)
+ catch (ParserConfigurationException pe)
{
throw new ProcessingException(pe);
}
- catch(ConfigurationException pe)
+ catch (ConfigurationException pe)
{
throw new ProcessingException(pe);
}
catch (ParsingException e)
{
- throw new ProcessingException( e );
+ throw new ProcessingException(e);
}
return;
}
+ private void generateSuccessStatusResponseType(String logOutRequestID, SAML2HandlerRequest request,
+ SAML2HandlerResponse response, String originalIssuer) throws ConfigurationException,
+ ParserConfigurationException, ProcessingException
+ {
+ StatusResponseType statusResponse = new StatusResponseType(IDGenerator.create("ID_"),
+ XMLTimeUtil.getIssueInstant());
- private void generateSuccessStatusResponseType(
- String logOutRequestID,
- SAML2HandlerRequest request,
- SAML2HandlerResponse response,
- String originalIssuer)
- throws ConfigurationException, ParserConfigurationException, ProcessingException
- {
- StatusResponseType statusResponse = new StatusResponseType();
-
//Status
StatusType statusType = new StatusType();
StatusCodeType statusCodeType = new StatusCodeType();
- statusCodeType.setValue( URI.create( JBossSAMLURIConstants.STATUS_RESPONDER.get() ));
-
+ statusCodeType.setValue(URI.create(JBossSAMLURIConstants.STATUS_RESPONDER.get()));
+
//2nd level status code
StatusCodeType status2ndLevel = new StatusCodeType();
- status2ndLevel.setValue( URI.create( JBossSAMLURIConstants.STATUS_SUCCESS.get() ));
+ status2ndLevel.setValue(URI.create(JBossSAMLURIConstants.STATUS_SUCCESS.get()));
statusCodeType.setStatusCode(status2ndLevel);
-
+
statusType.setStatusCode(statusCodeType);
-
+
statusResponse.setStatus(statusType);
-
- statusResponse.setIssueInstant(XMLTimeUtil.getIssueInstant());
+
statusResponse.setInResponseTo(logOutRequestID);
- statusResponse.setID(IDGenerator.create("ID_"));
- statusResponse.setVersion( JBossSAMLConstants.VERSION_2_0.get() );
-
+
statusResponse.setIssuer(request.getIssuer());
-
+
try
{
SAML2Response saml2Response = new SAML2Response();
- response.setResultingDocument(saml2Response.convert(statusResponse));
- }
- catch( ParsingException je)
+ response.setResultingDocument(saml2Response.convert(statusResponse));
+ }
+ catch (ParsingException je)
{
throw new ProcessingException(je);
}
-
+
response.setDestination(originalIssuer);
}
-
- private String getParticipant(IdentityServer server, String sessionID,
- String originalRequestor)
+
+ private String getParticipant(IdentityServer server, String sessionID, String originalRequestor)
{
int participants = server.stack().getParticipants(sessionID);
-
+
String participant = originalRequestor;
//Get a participant who is not equal to the original issuer of the logout request
- if(participants > 0)
+ if (participants > 0)
{
do
{
- participant = server.stack().pop(sessionID);
- --participants;
+ participant = server.stack().pop(sessionID);
+ --participants;
}
- while(participants > 0 && participant.equals(originalRequestor));
+ while (participants > 0 && participant.equals(originalRequestor));
}
-
- return participant;
+
+ return participant;
}
}
-
+
private class SPLogOutHandler
{
- public void generateSAMLRequest(SAML2HandlerRequest request,
- SAML2HandlerResponse response) throws ProcessingException
+ public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
{
//Generate the LogOut Request
SAML2Request samlRequest = new SAML2Request();
try
{
- LogoutRequestType lot =
- samlRequest.createLogoutRequest(request.getIssuer().getValue());
-
+ LogoutRequestType lot = samlRequest.createLogoutRequest(request.getIssuer().getValue());
+
response.setResultingDocument(samlRequest.convert(lot));
response.setSendRequest(true);
}
catch (Exception e)
{
throw new ProcessingException(e);
- }
+ }
}
-
- public void handleStatusResponseType( SAML2HandlerRequest request,
- SAML2HandlerResponse response ) throws ProcessingException
- {
+
+ public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
+ {
//Handler a log out response from IDP
StatusResponseType statusResponseType = (StatusResponseType) request.getSAML2Object();
-
+
HTTPContext httpContext = (HTTPContext) request.getContext();
HttpServletRequest servletRequest = httpContext.getRequest();
HttpSession session = servletRequest.getSession(false);
-
+
//TODO: Deal with partial logout report
-
+
StatusType statusType = statusResponseType.getStatus();
StatusCodeType statusCode = statusType.getStatusCode();
StatusCodeType secondLevelstatusCode = statusCode.getStatusCode();
- if(secondLevelstatusCode.getValue().toString().equals(JBossSAMLURIConstants.STATUS_SUCCESS.get()))
+ if (secondLevelstatusCode.getValue().toString().equals(JBossSAMLURIConstants.STATUS_SUCCESS.get()))
{
//we are successfully logged out
session.invalidate();
- }
+ }
}
-
- public void handleRequestType( SAML2HandlerRequest request,
- SAML2HandlerResponse response ) throws ProcessingException
- {
+
+ public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
+ {
SAML2Object samlObject = request.getSAML2Object();
- if(samlObject instanceof LogoutRequestType == false)
+ if (samlObject instanceof LogoutRequestType == false)
return;
-
+
LogoutRequestType logOutRequest = (LogoutRequestType) samlObject;
HTTPContext httpContext = (HTTPContext) request.getContext();
HttpServletRequest servletRequest = httpContext.getRequest();
HttpSession session = servletRequest.getSession(false);
-
+
String relayState = servletRequest.getParameter("RelayState");
-
+
session.invalidate(); //Invalidate the current session at the SP
-
+
//Generate a Logout Response
- StatusResponseType statusResponse = new StatusResponseType();
-
+ StatusResponseType statusResponse = null;
+ try
+ {
+ statusResponse = new StatusResponseType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant());
+ }
+ catch (ConfigurationException e)
+ {
+ throw new ProcessingException(e);
+ }
+
//Status
StatusType statusType = new StatusType();
StatusCodeType statusCodeType = new StatusCodeType();
- statusCodeType.setValue( URI.create( JBossSAMLURIConstants.STATUS_RESPONDER.get() ));
-
+ statusCodeType.setValue(URI.create(JBossSAMLURIConstants.STATUS_RESPONDER.get()));
+
//2nd level status code
StatusCodeType status2ndLevel = new StatusCodeType();
- status2ndLevel.setValue( URI.create( JBossSAMLURIConstants.STATUS_SUCCESS.get() ));
+ status2ndLevel.setValue(URI.create(JBossSAMLURIConstants.STATUS_SUCCESS.get()));
statusCodeType.setStatusCode(status2ndLevel);
-
+
statusType.setStatusCode(statusCodeType);
-
+
statusResponse.setStatus(statusType);
-
- try
- {
- statusResponse.setIssueInstant(XMLTimeUtil.getIssueInstant());
- }
- catch (ConfigurationException e)
- {
- throw new ProcessingException(e);
- }
+
statusResponse.setInResponseTo(logOutRequest.getID());
- statusResponse.setID(IDGenerator.create("ID_"));
- statusResponse.setVersion( JBossSAMLConstants.VERSION_2_0.get() );
-
+
statusResponse.setIssuer(request.getIssuer());
-
+
SAML2Response saml2Response = new SAML2Response();
try
{
- response.setResultingDocument(saml2Response.convert(statusResponse));
- }
- catch(Exception je)
+ response.setResultingDocument(saml2Response.convert(statusResponse));
+ }
+ catch (Exception je)
{
throw new ProcessingException(je);
}
-
+
response.setRelayState(relayState);
response.setDestination(logOutRequest.getIssuer().getValue());
response.setSendRequest(false);
}
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/IDPWebRequestUtil.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/IDPWebRequestUtil.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/IDPWebRequestUtil.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -350,13 +350,13 @@
{
if (trace)
log.trace(e1);
- responseType = saml2Response.createResponseType();
+ responseType = saml2Response.createResponseType(id);
}
catch (ProcessingException e)
{
if (trace)
log.trace(e);
- responseType = saml2Response.createResponseType();
+ responseType = saml2Response.createResponseType(id);
}
//Lets see how the response looks like
Modified: federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java 2011-06-23 01:05:52 UTC (rev 1023)
+++ federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java 2011-06-23 01:06:53 UTC (rev 1024)
@@ -35,7 +35,6 @@
import org.picketlink.identity.federation.core.interfaces.AttributeManager;
import org.picketlink.identity.federation.core.saml.v2.common.IDGenerator;
import org.picketlink.identity.federation.core.saml.v2.common.SAMLDocumentHolder;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.constants.X500SAMLProfileConstants;
import org.picketlink.identity.federation.core.saml.v2.holders.IssuerInfoHolder;
import org.picketlink.identity.federation.core.saml.v2.impl.DefaultSAML2HandlerChainConfig;
@@ -156,8 +155,7 @@
SAML2Handler.HANDLER_TYPE.IDP);
SAML2HandlerResponse response = new DefaultSAML2HandlerResponse();
- AssertionType assertion = new AssertionType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant(),
- JBossSAMLConstants.VERSION_2_0.get());
+ AssertionType assertion = new AssertionType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant());
Map<String, Object> myattr = new HashMap<String, Object>();
myattr.put("testKey", "hello");
13 years, 6 months
Picketlink SVN: r1023 - in federation/trunk/picketlink-fed-core/src: main/java/org/picketlink/identity/federation/core/parsers/saml/xacml and 12 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-22 21:05:52 -0400 (Wed, 22 Jun 2011)
New Revision: 1023
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion.xml
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLResponseParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloRequestParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloResponseParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/xacml/SAMLXACMLRequestParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java
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/JBossSAMLURIConstants.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnResponseFactory.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/SAMLAssertionFactory.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/identity/federation/core/wstrust/auth/Util.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/saml/v2/util/AssertionUtilUnitTestCase.java
Log:
PLFED-189: saml 1.1
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAML11SubjectParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -0,0 +1,331 @@
+/*
+ * JBoss, Home of Professional Open Source. Copyright 2008, Red Hat Middleware LLC, and individual contributors as
+ * indicated by the @author tags. See the copyright.txt file in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any
+ * later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to
+ * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
+ * http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.core.parsers.saml;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.events.Attribute;
+import javax.xml.stream.events.EndElement;
+import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
+
+import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
+import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11NameIdentifierType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectConfirmationType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType.SAML11SubjectTypeChoice;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationDataType;
+import org.picketlink.identity.xmlsec.w3.xmldsig.KeyInfoType;
+import org.picketlink.identity.xmlsec.w3.xmldsig.KeyValueType;
+import org.picketlink.identity.xmlsec.w3.xmldsig.RSAKeyValueType;
+import org.picketlink.identity.xmlsec.w3.xmldsig.X509CertificateType;
+import org.picketlink.identity.xmlsec.w3.xmldsig.X509DataType;
+
+/**
+ * Parse the saml subject
+ *
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Oct 12, 2010
+ */
+public class SAML11SubjectParser implements ParserNamespaceSupport
+{
+ /**
+ * @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
+ */
+ public Object parse(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StaxParserUtil.getNextEvent(xmlEventReader);
+
+ SAML11SubjectType subject = new SAML11SubjectType();
+
+ // Peek at the next event
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement endElement = (EndElement) xmlEvent;
+ if (StaxParserUtil.matches(endElement, JBossSAMLConstants.SUBJECT.get()))
+ {
+ endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ break;
+ }
+ else
+ throw new RuntimeException("Unknown End Element:" + StaxParserUtil.getEndElementName(endElement));
+ }
+
+ StartElement peekedElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (peekedElement == null)
+ break;
+
+ String tag = StaxParserUtil.getStartElementName(peekedElement);
+
+ if (SAML11Constants.NAME_IDENTIFIER.equalsIgnoreCase(tag))
+ {
+ peekedElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ SAML11NameIdentifierType nameID = new SAML11NameIdentifierType();
+ Attribute formatAtt = peekedElement.getAttributeByName(new QName(SAML11Constants.FORMAT));
+ if (formatAtt != null)
+ {
+ nameID.setFormat(URI.create(StaxParserUtil.getAttributeValue(formatAtt)));
+ }
+
+ String val = StaxParserUtil.getElementText(xmlEventReader);
+ nameID.setNameQualifier(val);
+ SAML11SubjectTypeChoice subChoice = new SAML11SubjectTypeChoice(nameID);
+ subject.setChoice(subChoice);
+ }
+ else if (JBossSAMLConstants.SUBJECT_CONFIRMATION.get().equalsIgnoreCase(tag))
+ {
+ SAML11SubjectConfirmationType subjectConfirmationType = new SAML11SubjectConfirmationType();
+ peekedElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+
+ // There may be additional things under subject confirmation
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof StartElement)
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String startTag = StaxParserUtil.getStartElementName(startElement);
+
+ if (startTag.equals(SAML11Constants.CONFIRMATION_METHOD))
+ {
+ String method = StaxParserUtil.getElementText(xmlEventReader);
+ subjectConfirmationType.addConfirmation(URI.create(method));
+ }
+
+ if (startTag.equals(JBossSAMLConstants.SUBJECT_CONFIRMATION_DATA.get()))
+ {
+ SubjectConfirmationDataType subjectConfirmationData = parseSubjectConfirmationData(xmlEventReader);
+ subjectConfirmationType.setSubjectConfirmationData(subjectConfirmationData);
+ }
+ }
+
+ subject.setSubjectConfirmation(subjectConfirmationType);
+
+ // Get the end tag
+ EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
+ StaxParserUtil.matches(endElement, JBossSAMLConstants.SUBJECT_CONFIRMATION.get());
+ }
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::location=" + peekedElement.getLocation());
+ }
+ return subject;
+ }
+
+ /**
+ * @see {@link ParserNamespaceSupport#supports(QName)}
+ */
+ public boolean supports(QName qname)
+ {
+ String nsURI = qname.getNamespaceURI();
+ String localPart = qname.getLocalPart();
+
+ return nsURI.equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())
+ && localPart.equals(JBossSAMLConstants.SUBJECT.get());
+ }
+
+ private SubjectConfirmationDataType parseSubjectConfirmationData(XMLEventReader xmlEventReader)
+ throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, JBossSAMLConstants.SUBJECT_CONFIRMATION_DATA.get());
+
+ SubjectConfirmationDataType subjectConfirmationData = new SubjectConfirmationDataType();
+
+ Attribute inResponseTo = startElement.getAttributeByName(new QName(JBossSAMLConstants.IN_RESPONSE_TO.get()));
+ if (inResponseTo != null)
+ {
+ subjectConfirmationData.setInResponseTo(StaxParserUtil.getAttributeValue(inResponseTo));
+ }
+
+ Attribute notBefore = startElement.getAttributeByName(new QName(JBossSAMLConstants.NOT_BEFORE.get()));
+ if (notBefore != null)
+ {
+ subjectConfirmationData.setNotBefore(XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(notBefore)));
+ }
+
+ Attribute notOnOrAfter = startElement.getAttributeByName(new QName(JBossSAMLConstants.NOT_ON_OR_AFTER.get()));
+ if (notOnOrAfter != null)
+ {
+ subjectConfirmationData.setNotOnOrAfter(XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(notOnOrAfter)));
+ }
+
+ Attribute recipient = startElement.getAttributeByName(new QName(JBossSAMLConstants.RECIPIENT.get()));
+ if (recipient != null)
+ {
+ subjectConfirmationData.setRecipient(StaxParserUtil.getAttributeValue(recipient));
+ }
+
+ Attribute address = startElement.getAttributeByName(new QName(JBossSAMLConstants.ADDRESS.get()));
+ if (address != null)
+ {
+ subjectConfirmationData.setAddress(StaxParserUtil.getAttributeValue(address));
+ }
+
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (!(xmlEvent instanceof EndElement))
+ {
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ String tag = StaxParserUtil.getStartElementName(startElement);
+ if (tag.equals(WSTrustConstants.XMLDSig.KEYINFO))
+ {
+ KeyInfoType keyInfo = parseKeyInfo(xmlEventReader);
+ subjectConfirmationData.setAnyType(keyInfo);
+ }
+ else if (tag.equals(WSTrustConstants.XMLEnc.ENCRYPTED_KEY))
+ {
+ subjectConfirmationData.setAnyType(StaxParserUtil.getDOMElement(xmlEventReader));
+ }
+ else
+ throw new RuntimeException("Handle:" + tag);
+ }
+
+ // Get the end tag
+ EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
+ StaxParserUtil.matches(endElement, JBossSAMLConstants.SUBJECT_CONFIRMATION_DATA.get());
+ return subjectConfirmationData;
+ }
+
+ private KeyInfoType parseKeyInfo(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ KeyInfoType keyInfo = new KeyInfoType();
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, WSTrustConstants.XMLDSig.KEYINFO);
+
+ XMLEvent xmlEvent = null;
+ String tag = null;
+
+ while (xmlEventReader.hasNext())
+ {
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ tag = StaxParserUtil.getEndElementName((EndElement) xmlEvent);
+ if (tag.equals(WSTrustConstants.XMLDSig.KEYINFO))
+ {
+ xmlEvent = StaxParserUtil.getNextEndElement(xmlEventReader);
+ break;
+ }
+ else
+ throw new RuntimeException("unknown end element:" + tag);
+ }
+ startElement = (StartElement) xmlEvent;
+ tag = StaxParserUtil.getStartElementName(startElement);
+ if (tag.equals(WSTrustConstants.XMLEnc.ENCRYPTED_KEY))
+ {
+ keyInfo.addContent(StaxParserUtil.getDOMElement(xmlEventReader));
+ }
+ else if (tag.equals(WSTrustConstants.XMLDSig.X509DATA))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ X509DataType x509 = new X509DataType();
+
+ // Let us go for the X509 certificate
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, WSTrustConstants.XMLDSig.X509CERT);
+
+ X509CertificateType cert = new X509CertificateType();
+ String certValue = StaxParserUtil.getElementText(xmlEventReader);
+ cert.setEncodedCertificate(certValue.getBytes());
+ x509.add(cert);
+
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, WSTrustConstants.XMLDSig.X509DATA);
+ keyInfo.addContent(x509);
+ }
+ else if (tag.equals(WSTrustConstants.XMLDSig.KEYVALUE))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ KeyValueType keyValue = new KeyValueType();
+
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ tag = StaxParserUtil.getStartElementName(startElement);
+ if (tag.equals(WSTrustConstants.XMLDSig.RSA_KEYVALUE))
+ {
+ keyValue.getContent().add(this.parseRSAKeyValue(xmlEventReader));
+ }
+ else if (tag.equals(WSTrustConstants.XMLDSig.DSA_KEYVALUE))
+ {
+ // TODO: parse the DSA key contents.
+ }
+ else
+ throw new ParsingException("Unknown element: " + tag);
+
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, WSTrustConstants.XMLDSig.KEYVALUE);
+
+ keyInfo.addContent(keyValue);
+ }
+ }
+ return keyInfo;
+ }
+
+ private RSAKeyValueType parseRSAKeyValue(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, WSTrustConstants.XMLDSig.RSA_KEYVALUE);
+
+ XMLEvent xmlEvent = null;
+ String tag = null;
+
+ RSAKeyValueType rsaKeyValue = new RSAKeyValueType();
+
+ while (xmlEventReader.hasNext())
+ {
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent instanceof EndElement)
+ {
+ tag = StaxParserUtil.getEndElementName((EndElement) xmlEvent);
+ if (tag.equals(WSTrustConstants.XMLDSig.RSA_KEYVALUE))
+ {
+ xmlEvent = StaxParserUtil.getNextEndElement(xmlEventReader);
+ break;
+ }
+ else
+ throw new RuntimeException("unknown end element:" + tag);
+ }
+
+ startElement = (StartElement) xmlEvent;
+ tag = StaxParserUtil.getStartElementName(startElement);
+ if (tag.equals(WSTrustConstants.XMLDSig.MODULUS))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String text = StaxParserUtil.getElementText(xmlEventReader);
+ rsaKeyValue.setModulus(text.getBytes());
+ }
+ else if (tag.equals(WSTrustConstants.XMLDSig.EXPONENT))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String text = StaxParserUtil.getElementText(xmlEventReader);
+ rsaKeyValue.setExponent(text.getBytes());
+ }
+ else
+ throw new ParsingException("Unknown element: " + tag);
+ }
+ return rsaKeyValue;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -44,6 +44,7 @@
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
import org.picketlink.identity.federation.saml.v2.assertion.AuthnStatementType;
@@ -60,207 +61,213 @@
* @since Oct 12, 2010
*/
public class SAMLAssertionParser implements ParserNamespaceSupport
-{
- private String ASSERTION = JBossSAMLConstants.ASSERTION.get();
-
- public AssertionType fromElement( Element element ) throws ConfigurationException, ProcessingException, ParsingException
+{
+ private final String ASSERTION = JBossSAMLConstants.ASSERTION.get();
+
+ public AssertionType fromElement(Element element) throws ConfigurationException, ProcessingException,
+ ParsingException
{
- XMLEventReader xmlEventReader = StaxParserUtil.getXMLEventReader( DocumentUtil.getNodeAsStream(element));
+ XMLEventReader xmlEventReader = StaxParserUtil.getXMLEventReader(DocumentUtil.getNodeAsStream(element));
return (AssertionType) parse(xmlEventReader);
}
-
+
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
StartElement startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
String startElementName = StaxParserUtil.getStartElementName(startElement);
- if( startElementName.equals( JBossSAMLConstants.ENCRYPTED_ASSERTION.get() ))
+ if (startElementName.equals(JBossSAMLConstants.ENCRYPTED_ASSERTION.get()))
{
Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);
-
+
EncryptedAssertionType encryptedAssertion = new EncryptedAssertionType();
- encryptedAssertion.setEncryptedElement( domElement );
- return encryptedAssertion;
+ encryptedAssertion.setEncryptedElement(domElement);
+ return encryptedAssertion;
}
-
-
- startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+
//Special case: Encrypted Assertion
- StaxParserUtil.validate(startElement, ASSERTION );
- AssertionType assertion = parseBaseAttributes( startElement );
+ StaxParserUtil.validate(startElement, ASSERTION);
+ AssertionType assertion = parseBaseAttributes(startElement);
//Peek at the next event
- while( xmlEventReader.hasNext() )
- {
- XMLEvent xmlEvent = StaxParserUtil.peek( xmlEventReader );
- if( xmlEvent == null )
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
break;
-
- if( xmlEvent instanceof EndElement )
+
+ if (xmlEvent instanceof EndElement)
{
- xmlEvent = StaxParserUtil.getNextEvent( xmlEventReader );
+ xmlEvent = StaxParserUtil.getNextEvent(xmlEventReader);
EndElement endElement = (EndElement) xmlEvent;
- String endElementTag = StaxParserUtil.getEndElementName( endElement );
- if( endElementTag.equals( JBossSAMLConstants.ASSERTION.get() ) )
+ String endElementTag = StaxParserUtil.getEndElementName(endElement);
+ if (endElementTag.equals(JBossSAMLConstants.ASSERTION.get()))
break;
else
- throw new RuntimeException( "Unknown End Element:" + endElementTag );
+ throw new RuntimeException("Unknown End Element:" + endElementTag);
}
-
+
StartElement peekedElement = null;
- if( xmlEvent instanceof StartElement )
+ if (xmlEvent instanceof StartElement)
{
peekedElement = (StartElement) xmlEvent;
}
else
{
- peekedElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
+ peekedElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
}
- if( peekedElement == null )
- break;
+ if (peekedElement == null)
+ break;
- String tag = StaxParserUtil.getStartElementName( peekedElement );
+ String tag = StaxParserUtil.getStartElementName(peekedElement);
- if( tag.equals( JBossSAMLConstants.SIGNATURE.get() ) )
- {
- assertion.setSignature( StaxParserUtil.getDOMElement(xmlEventReader) );
- continue;
+ if (tag.equals(JBossSAMLConstants.SIGNATURE.get()))
+ {
+ assertion.setSignature(StaxParserUtil.getDOMElement(xmlEventReader));
+ continue;
}
- if( JBossSAMLConstants.ISSUER.get().equalsIgnoreCase( tag ) )
+ if (JBossSAMLConstants.ISSUER.get().equalsIgnoreCase(tag))
{
startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
String issuerValue = StaxParserUtil.getElementText(xmlEventReader);
NameIDType issuer = new NameIDType();
- issuer.setValue( issuerValue );
+ issuer.setValue(issuerValue);
- assertion.setIssuer( issuer );
- }
- else if( JBossSAMLConstants.SUBJECT.get().equalsIgnoreCase( tag ) )
+ assertion.setIssuer(issuer);
+ }
+ else if (JBossSAMLConstants.SUBJECT.get().equalsIgnoreCase(tag))
{
SAMLSubjectParser subjectParser = new SAMLSubjectParser();
- assertion.setSubject( (SubjectType) subjectParser.parse(xmlEventReader));
+ assertion.setSubject((SubjectType) subjectParser.parse(xmlEventReader));
}
- else if( JBossSAMLConstants.CONDITIONS.get().equalsIgnoreCase( tag ) )
+ else if (JBossSAMLConstants.CONDITIONS.get().equalsIgnoreCase(tag))
{
SAMLConditionsParser conditionsParser = new SAMLConditionsParser();
- ConditionsType conditions = (ConditionsType) conditionsParser.parse(xmlEventReader);
+ ConditionsType conditions = (ConditionsType) conditionsParser.parse(xmlEventReader);
- assertion.setConditions( conditions );
- }
- else if( JBossSAMLConstants.AUTHN_STATEMENT.get().equalsIgnoreCase( tag ) )
+ assertion.setConditions(conditions);
+ }
+ else if (JBossSAMLConstants.AUTHN_STATEMENT.get().equalsIgnoreCase(tag))
{
- AuthnStatementType authnStatementType = SAMLParserUtil.parseAuthnStatement( xmlEventReader );
- assertion.addStatement(authnStatementType);
+ AuthnStatementType authnStatementType = SAMLParserUtil.parseAuthnStatement(xmlEventReader);
+ assertion.addStatement(authnStatementType);
}
- else if( JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase( tag ) )
+ else if (JBossSAMLConstants.ATTRIBUTE_STATEMENT.get().equalsIgnoreCase(tag))
{
- AttributeStatementType attributeStatementType = SAMLParserUtil.parseAttributeStatement( xmlEventReader );
- assertion.addStatement(attributeStatementType);
+ AttributeStatementType attributeStatementType = SAMLParserUtil.parseAttributeStatement(xmlEventReader);
+ assertion.addStatement(attributeStatementType);
}
- else if( JBossSAMLConstants.STATEMENT.get().equalsIgnoreCase( tag ) )
- {
+ else if (JBossSAMLConstants.STATEMENT.get().equalsIgnoreCase(tag))
+ {
startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-
+
String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
- if( xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_STATEMENT_TYPE.get() ))
+ if (xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_STATEMENT_TYPE.get()))
{
XACMLAuthzDecisionStatementType authZStat = new XACMLAuthzDecisionStatementType();
-
+
startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
tag = StaxParserUtil.getStartElementName(startElement);
-
- if( tag.contains( JBossSAMLConstants.RESPONSE.get() ) )
+
+ if (tag.contains(JBossSAMLConstants.RESPONSE.get()))
{
- authZStat.setResponse( getXACMLResponse( xmlEventReader ));
+ authZStat.setResponse(getXACMLResponse(xmlEventReader));
startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
//There may be request also
tag = StaxParserUtil.getStartElementName(startElement);
- if( tag.contains( JBossSAMLConstants.REQUEST.get() ) )
+ if (tag.contains(JBossSAMLConstants.REQUEST.get()))
{
- authZStat.setRequest( getXACMLRequest( xmlEventReader ));
+ authZStat.setRequest(getXACMLRequest(xmlEventReader));
}
- }
-
+ }
+
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, JBossSAMLConstants.STATEMENT.get() );
+ StaxParserUtil.validate(endElement, JBossSAMLConstants.STATEMENT.get());
assertion.addStatement(authZStat);
- }
+ }
else
- throw new RuntimeException( "Unknown xsi:type=" + xsiTypeValue );
+ throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
}
- else throw new RuntimeException( "SAMLAssertionParser:: unknown: " + tag + "::location=" + peekedElement.getLocation() );
+ else
+ throw new RuntimeException("SAMLAssertionParser:: unknown: " + tag + "::location="
+ + peekedElement.getLocation());
}
return assertion;
}
-
+
/**
* @see {@link ParserNamespaceSupport#supports(QName)}
*/
public boolean supports(QName qname)
- {
+ {
String nsURI = qname.getNamespaceURI();
String localPart = qname.getLocalPart();
-
- return nsURI.equals( JBossSAMLURIConstants.ASSERTION_NSURI.get() )
- && localPart.equals( JBossSAMLConstants.ASSERTION.get() );
- }
-
- private AssertionType parseBaseAttributes( StartElement nextElement ) throws ParsingException
- {
- Attribute idAttribute = nextElement.getAttributeByName( new QName( JBossSAMLConstants.ID.get() ) );
- String id = StaxParserUtil.getAttributeValue( idAttribute );
- Attribute versionAttribute = nextElement.getAttributeByName( new QName( JBossSAMLConstants.VERSION.get() ));
- String version = StaxParserUtil.getAttributeValue(versionAttribute) ;
+ return nsURI.equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())
+ && localPart.equals(JBossSAMLConstants.ASSERTION.get());
+ }
- Attribute issueInstantAttribute = nextElement.getAttributeByName( new QName( JBossSAMLConstants.ISSUE_INSTANT.get() ));
- XMLGregorianCalendar issueInstant = XMLTimeUtil.parse( StaxParserUtil.getAttributeValue(issueInstantAttribute ));
-
- return new AssertionType( id, issueInstant, version );
+ private AssertionType parseBaseAttributes(StartElement nextElement) throws ParsingException
+ {
+ Attribute idAttribute = nextElement.getAttributeByName(new QName(JBossSAMLConstants.ID.get()));
+ String id = StaxParserUtil.getAttributeValue(idAttribute);
+
+ Attribute versionAttribute = nextElement.getAttributeByName(new QName(JBossSAMLConstants.VERSION.get()));
+ String version = StaxParserUtil.getAttributeValue(versionAttribute);
+ StringUtil.match(JBossSAMLConstants.VERSION_2_0.get(), version);
+
+ Attribute issueInstantAttribute = nextElement
+ .getAttributeByName(new QName(JBossSAMLConstants.ISSUE_INSTANT.get()));
+ XMLGregorianCalendar issueInstant = XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstantAttribute));
+
+ return new AssertionType(id, issueInstant);
}
-
+
@SuppressWarnings("unchecked")
- private ResponseType getXACMLResponse( XMLEventReader xmlEventReader ) throws ParsingException
+ private ResponseType getXACMLResponse(XMLEventReader xmlEventReader) throws ParsingException
{
Element xacmlResponse = StaxParserUtil.getDOMElement(xmlEventReader);
//xacml request
- String xacmlPath = "org.jboss.security.xacml.core.model.context";
+ String xacmlPath = "org.jboss.security.xacml.core.model.context";
try
{
- JAXBContext jaxb = JAXBContext.newInstance( xacmlPath );
+ JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
Unmarshaller un = jaxb.createUnmarshaller();
un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
- JAXBElement<ResponseType> jaxbResponseType = (JAXBElement<ResponseType>) un.unmarshal( DocumentUtil.getNodeAsStream(xacmlResponse));
- return jaxbResponseType.getValue();
+ JAXBElement<ResponseType> jaxbResponseType = (JAXBElement<ResponseType>) un.unmarshal(DocumentUtil
+ .getNodeAsStream(xacmlResponse));
+ return jaxbResponseType.getValue();
}
- catch ( Exception e)
+ catch (Exception e)
{
- throw new ParsingException( e );
- }
+ throw new ParsingException(e);
+ }
}
-
+
@SuppressWarnings("unchecked")
- private RequestType getXACMLRequest( XMLEventReader xmlEventReader ) throws ParsingException
+ private RequestType getXACMLRequest(XMLEventReader xmlEventReader) throws ParsingException
{
Element xacmlRequest = StaxParserUtil.getDOMElement(xmlEventReader);
//xacml request
- String xacmlPath = "org.jboss.security.xacml.core.model.context";
+ String xacmlPath = "org.jboss.security.xacml.core.model.context";
try
{
- JAXBContext jaxb = JAXBContext.newInstance( xacmlPath );
+ JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
Unmarshaller un = jaxb.createUnmarshaller();
un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
- JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal( DocumentUtil.getNodeAsStream(xacmlRequest));
- return jaxbRequestType.getValue();
+ JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal(DocumentUtil
+ .getNodeAsStream(xacmlRequest));
+ return jaxbRequestType.getValue();
}
- catch ( Exception e)
+ catch (Exception e)
{
- throw new ParsingException( e );
- }
- }
+ throw new ParsingException(e);
+ }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -32,7 +32,7 @@
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
+import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.picketlink.identity.federation.saml.v2.assertion.ConditionsType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
import org.picketlink.identity.federation.saml.v2.protocol.AuthnRequestType;
@@ -50,49 +50,50 @@
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
//Get the startelement
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(startElement, JBossSAMLConstants.AUTHN_REQUEST.get() );
-
- AuthnRequestType authnRequest = parseBaseAttributes( startElement );
-
- while( xmlEventReader.hasNext() )
+ StaxParserUtil.validate(startElement, JBossSAMLConstants.AUTHN_REQUEST.get());
+
+ AuthnRequestType authnRequest = parseBaseAttributes(startElement);
+
+ while (xmlEventReader.hasNext())
{
//Let us peek at the next start element
- startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( startElement == null )
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
break;
super.parseCommonElements(startElement, xmlEventReader, authnRequest);
-
- String elementName = StaxParserUtil.getStartElementName( startElement );
-
- if( JBossSAMLConstants.NAMEID_POLICY.get().equals( elementName ))
+
+ String elementName = StaxParserUtil.getStartElementName(startElement);
+
+ if (JBossSAMLConstants.NAMEID_POLICY.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
- authnRequest.setNameIDPolicy( getNameIDPolicy( startElement ));
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ authnRequest.setNameIDPolicy(getNameIDPolicy(startElement));
}
- else if( JBossSAMLConstants.SUBJECT.get().equals( elementName ))
- {
- authnRequest.setSubject( getSubject(xmlEventReader) );
+ else if (JBossSAMLConstants.SUBJECT.get().equals(elementName))
+ {
+ authnRequest.setSubject(getSubject(xmlEventReader));
}
- else if( JBossSAMLConstants.CONDITIONS.get().equals( elementName ))
- {
- authnRequest.setConditions( (ConditionsType) ( new SAMLConditionsParser()).parse(xmlEventReader));
+ else if (JBossSAMLConstants.CONDITIONS.get().equals(elementName))
+ {
+ authnRequest.setConditions((ConditionsType) (new SAMLConditionsParser()).parse(xmlEventReader));
}
- else if( JBossSAMLConstants.REQUESTED_AUTHN_CONTEXT.get().equals( elementName ))
- {
- authnRequest.setRequestedAuthnContext( getRequestedAuthnContextType(xmlEventReader));
+ else if (JBossSAMLConstants.REQUESTED_AUTHN_CONTEXT.get().equals(elementName))
+ {
+ authnRequest.setRequestedAuthnContext(getRequestedAuthnContextType(xmlEventReader));
}
- else if( JBossSAMLConstants.ISSUER.get().equals( elementName ))
- {
+ else if (JBossSAMLConstants.ISSUER.get().equals(elementName))
+ {
continue;
}
- else if( JBossSAMLConstants.SIGNATURE.get().equals( elementName ))
- {
+ else if (JBossSAMLConstants.SIGNATURE.get().equals(elementName))
+ {
continue;
}
- else throw new RuntimeException( "Unknown Element:" + elementName + "::location=" + startElement.getLocation() );
+ else
+ throw new RuntimeException("Unknown Element:" + elementName + "::location=" + startElement.getLocation());
}
return authnRequest;
}
@@ -102,61 +103,64 @@
*/
public boolean supports(QName qname)
{
- return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( qname.getNamespaceURI() ) ;
+ return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(qname.getNamespaceURI());
}
-
+
/**
* Parse the attributes at the authnrequesttype element
* @param startElement
* @return
* @throws ParsingException
*/
- private AuthnRequestType parseBaseAttributes( StartElement startElement ) throws ParsingException
- {
+ private AuthnRequestType parseBaseAttributes(StartElement startElement) throws ParsingException
+ {
super.parseRequiredAttributes(startElement);
- AuthnRequestType authnRequest = new AuthnRequestType( id, version, issueInstant );
+ AuthnRequestType authnRequest = new AuthnRequestType(id, issueInstant);
//Let us get the attributes
- super.parseBaseAttributes(startElement, authnRequest );
-
- Attribute assertionConsumerServiceURL = startElement.getAttributeByName( new QName( "AssertionConsumerServiceURL" ));
- if( assertionConsumerServiceURL != null )
+ super.parseBaseAttributes(startElement, authnRequest);
+
+ Attribute assertionConsumerServiceURL = startElement.getAttributeByName(new QName("AssertionConsumerServiceURL"));
+ if (assertionConsumerServiceURL != null)
{
- String uri = StaxParserUtil.getAttributeValue( assertionConsumerServiceURL );
- authnRequest.setAssertionConsumerServiceURL( URI.create(uri));
+ String uri = StaxParserUtil.getAttributeValue(assertionConsumerServiceURL);
+ authnRequest.setAssertionConsumerServiceURL(URI.create(uri));
}
-
- Attribute assertionConsumerServiceIndex = startElement.getAttributeByName( new QName( "AssertionConsumerServiceIndex" ));
- if( assertionConsumerServiceIndex != null )
- authnRequest.setAssertionConsumerServiceIndex( Integer.parseInt( StaxParserUtil.getAttributeValue( assertionConsumerServiceIndex )));
-
- Attribute protocolBinding = startElement.getAttributeByName( new QName( "ProtocolBinding" ));
- if( protocolBinding != null )
- authnRequest.setProtocolBinding( URI.create( StaxParserUtil.getAttributeValue( protocolBinding )));
-
- Attribute providerName = startElement.getAttributeByName( new QName( "ProviderName" ));
- if( providerName != null )
- authnRequest.setProviderName( StaxParserUtil.getAttributeValue( providerName ));
-
- Attribute forceAuthn = startElement.getAttributeByName( new QName( "ForceAuthn" ));
- if( forceAuthn != null )
+ Attribute assertionConsumerServiceIndex = startElement.getAttributeByName(new QName(
+ "AssertionConsumerServiceIndex"));
+ if (assertionConsumerServiceIndex != null)
+ authnRequest.setAssertionConsumerServiceIndex(Integer.parseInt(StaxParserUtil
+ .getAttributeValue(assertionConsumerServiceIndex)));
+
+ Attribute protocolBinding = startElement.getAttributeByName(new QName("ProtocolBinding"));
+ if (protocolBinding != null)
+ authnRequest.setProtocolBinding(URI.create(StaxParserUtil.getAttributeValue(protocolBinding)));
+
+ Attribute providerName = startElement.getAttributeByName(new QName("ProviderName"));
+ if (providerName != null)
+ authnRequest.setProviderName(StaxParserUtil.getAttributeValue(providerName));
+
+ Attribute forceAuthn = startElement.getAttributeByName(new QName("ForceAuthn"));
+ if (forceAuthn != null)
{
- authnRequest.setForceAuthn( Boolean.parseBoolean( StaxParserUtil.getAttributeValue( forceAuthn ) ));
+ authnRequest.setForceAuthn(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(forceAuthn)));
}
-
- Attribute isPassive = startElement.getAttributeByName( new QName( "IsPassive" ));
- if( isPassive != null )
+
+ Attribute isPassive = startElement.getAttributeByName(new QName("IsPassive"));
+ if (isPassive != null)
{
- authnRequest.setIsPassive( Boolean.parseBoolean( StaxParserUtil.getAttributeValue( isPassive ) ));
+ authnRequest.setIsPassive(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(isPassive)));
}
-
- Attribute attributeConsumingServiceIndex = startElement.getAttributeByName( new QName( "AttributeConsumingServiceIndex" ));
- if( attributeConsumingServiceIndex != null )
- authnRequest.setAttributeConsumingServiceIndex( Integer.parseInt( StaxParserUtil.getAttributeValue( attributeConsumingServiceIndex )));
-
- return authnRequest;
- }
-
+
+ Attribute attributeConsumingServiceIndex = startElement.getAttributeByName(new QName(
+ "AttributeConsumingServiceIndex"));
+ if (attributeConsumingServiceIndex != null)
+ authnRequest.setAttributeConsumingServiceIndex(Integer.parseInt(StaxParserUtil
+ .getAttributeValue(attributeConsumingServiceIndex)));
+
+ return authnRequest;
+ }
+
/**
* Get the NameIDPolicy
* @param startElement
@@ -165,39 +169,41 @@
private NameIDPolicyType getNameIDPolicy(StartElement startElement)
{
NameIDPolicyType nameIDPolicy = new NameIDPolicyType();
- Attribute format = startElement.getAttributeByName( new QName( "Format" ));
- if( format != null )
- nameIDPolicy.setFormat( URI.create( StaxParserUtil.getAttributeValue( format )));
-
- Attribute allowCreate = startElement.getAttributeByName( new QName( "AllowCreate" ));
- if( allowCreate != null )
- nameIDPolicy.setAllowCreate( Boolean.parseBoolean( StaxParserUtil.getAttributeValue( allowCreate )));
-
+ Attribute format = startElement.getAttributeByName(new QName("Format"));
+ if (format != null)
+ nameIDPolicy.setFormat(URI.create(StaxParserUtil.getAttributeValue(format)));
+
+ Attribute allowCreate = startElement.getAttributeByName(new QName("AllowCreate"));
+ if (allowCreate != null)
+ nameIDPolicy.setAllowCreate(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(allowCreate)));
+
return nameIDPolicy;
- }
-
- private SubjectType getSubject( XMLEventReader xmlEventReader ) throws ParsingException
+ }
+
+ private SubjectType getSubject(XMLEventReader xmlEventReader) throws ParsingException
{
SAMLSubjectParser subjectParser = new SAMLSubjectParser();
return (SubjectType) subjectParser.parse(xmlEventReader);
}
-
- private RequestedAuthnContextType getRequestedAuthnContextType( XMLEventReader xmlEventReader ) throws ParsingException
+
+ private RequestedAuthnContextType getRequestedAuthnContextType(XMLEventReader xmlEventReader)
+ throws ParsingException
{
RequestedAuthnContextType ract = new RequestedAuthnContextType();
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(startElement, JBossSAMLConstants.REQUESTED_AUTHN_CONTEXT.get() );
-
+ StaxParserUtil.validate(startElement, JBossSAMLConstants.REQUESTED_AUTHN_CONTEXT.get());
+
startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
String elName = StaxParserUtil.getStartElementName(startElement);
-
- if( elName.equals( JBossSAMLConstants.AUTHN_CONTEXT_CLASS_REF.get() ))
+
+ if (elName.equals(JBossSAMLConstants.AUTHN_CONTEXT_CLASS_REF.get()))
{
String value = StaxParserUtil.getElementText(xmlEventReader);
ract.addAuthnContextClassRef(value);
}
- else throw new RuntimeException( "unknown :" + elName );
-
+ else
+ throw new RuntimeException("unknown :" + elName);
+
return ract;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -33,6 +33,7 @@
import org.picketlink.identity.federation.core.parsers.saml.metadata.SAMLEntityDescriptorParser;
import org.picketlink.identity.federation.core.parsers.saml.xacml.SAMLXACMLRequestParser;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
@@ -42,94 +43,101 @@
* @since Oct 12, 2010
*/
public class SAMLParser extends AbstractParser
-{
+{
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
{
- while( xmlEventReader.hasNext() )
+ while (xmlEventReader.hasNext())
{
XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
- if( xmlEvent instanceof StartElement )
+ if (xmlEvent instanceof StartElement)
{
StartElement startElement = (StartElement) xmlEvent;
QName startElementName = startElement.getName();
String nsURI = startElementName.getNamespaceURI();
-
+
String localPart = startElementName.getLocalPart();
- String elementName = StaxParserUtil.getStartElementName( startElement );
- if( elementName.equalsIgnoreCase( JBossSAMLConstants.ASSERTION.get() ))
+ String elementName = StaxParserUtil.getStartElementName(startElement);
+
+ if (elementName.equalsIgnoreCase(JBossSAMLConstants.ASSERTION.get()))
{
+ if (nsURI.equals(SAML11Constants.ASSERTION_11_NSURI))
+ {
+ SAML11AssertionParser saml11AssertionParser = new SAML11AssertionParser();
+ return saml11AssertionParser.parse(xmlEventReader);
+ }
SAMLAssertionParser assertionParser = new SAMLAssertionParser();
- return assertionParser.parse( xmlEventReader );
+ return assertionParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( nsURI ) &&
- JBossSAMLConstants.AUTHN_REQUEST.get().equals( startElementName.getLocalPart() ))
+ else if (JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(nsURI)
+ && JBossSAMLConstants.AUTHN_REQUEST.get().equals(startElementName.getLocalPart()))
{
SAMLAuthNRequestParser authNRequestParser = new SAMLAuthNRequestParser();
- return authNRequestParser.parse( xmlEventReader );
+ return authNRequestParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( nsURI ) &&
- JBossSAMLConstants.LOGOUT_REQUEST.get().equals( startElementName.getLocalPart() ))
+ else if (JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(nsURI)
+ && JBossSAMLConstants.LOGOUT_REQUEST.get().equals(startElementName.getLocalPart()))
{
SAMLSloRequestParser sloParser = new SAMLSloRequestParser();
- return sloParser.parse( xmlEventReader );
+ return sloParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( nsURI ) &&
- JBossSAMLConstants.LOGOUT_RESPONSE.get().equals( startElementName.getLocalPart() ))
+ else if (JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(nsURI)
+ && JBossSAMLConstants.LOGOUT_RESPONSE.get().equals(startElementName.getLocalPart()))
{
SAMLSloResponseParser sloParser = new SAMLSloResponseParser();
- return sloParser.parse( xmlEventReader );
+ return sloParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( nsURI ) &&
- JBossSAMLConstants.RESPONSE.get().equals( startElementName.getLocalPart() ))
+ else if (JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(nsURI)
+ && JBossSAMLConstants.RESPONSE.get().equals(startElementName.getLocalPart()))
{
SAMLResponseParser responseParser = new SAMLResponseParser();
- return responseParser.parse( xmlEventReader );
+ return responseParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( nsURI ) &&
- JBossSAMLConstants.REQUEST_ABSTRACT.get().equals( startElementName.getLocalPart() ))
- {
- String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
- if( xsiTypeValue.contains( JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY_TYPE.get() ))
+ else if (JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(nsURI)
+ && JBossSAMLConstants.REQUEST_ABSTRACT.get().equals(startElementName.getLocalPart()))
+ {
+ String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
+ if (xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY_TYPE.get()))
{
SAMLXACMLRequestParser samlXacmlParser = new SAMLXACMLRequestParser();
- return samlXacmlParser.parse(xmlEventReader);
+ return samlXacmlParser.parse(xmlEventReader);
}
- throw new RuntimeException( "Unknown xsi:type=" + xsiTypeValue );
+ throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
}
- else if( JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get().equals( localPart ) )
+ else if (JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get().equals(localPart))
{
SAMLXACMLRequestParser samlXacmlParser = new SAMLXACMLRequestParser();
return samlXacmlParser.parse(xmlEventReader);
}
- else if( JBossSAMLConstants.ENTITY_DESCRIPTOR.get().equals( localPart ))
+ else if (JBossSAMLConstants.ENTITY_DESCRIPTOR.get().equals(localPart))
{
SAMLEntityDescriptorParser entityDescriptorParser = new SAMLEntityDescriptorParser();
- return entityDescriptorParser.parse( xmlEventReader );
+ return entityDescriptorParser.parse(xmlEventReader);
}
- else if( JBossSAMLConstants.ENTITIES_DESCRIPTOR.get().equals( localPart ))
+ else if (JBossSAMLConstants.ENTITIES_DESCRIPTOR.get().equals(localPart))
{
SAMLEntitiesDescriptorParser entityDescriptorParser = new SAMLEntitiesDescriptorParser();
- return entityDescriptorParser.parse( xmlEventReader );
+ return entityDescriptorParser.parse(xmlEventReader);
}
- else if( JBossSAMLURIConstants.ASSERTION_NSURI.get().equals(nsURI) )
+ else if (JBossSAMLURIConstants.ASSERTION_NSURI.get().equals(nsURI))
{
- SAMLAssertionParser assertionParser = new SAMLAssertionParser();
- return assertionParser.parse( xmlEventReader );
- }
- else throw new RuntimeException( "Unknown Tag:" + elementName + "::location=" + startElement.getLocation() );
+ SAMLAssertionParser assertionParser = new SAMLAssertionParser();
+ return assertionParser.parse(xmlEventReader);
+ }
+ else
+ throw new RuntimeException("Unknown Tag:" + elementName + "::location=" + startElement.getLocation());
}
else
{
- StaxParserUtil.getNextEvent(xmlEventReader);
+ StaxParserUtil.getNextEvent(xmlEventReader);
}
}
- throw new RuntimeException( "SAML Parsing has failed" );
+ throw new RuntimeException("SAML Parsing has failed");
}
/**
@@ -137,6 +145,6 @@
*/
public boolean supports(QName qname)
{
- return JBossSAMLURIConstants.ASSERTION_NSURI.get().equals( qname.getNamespaceURI() );
+ return JBossSAMLURIConstants.ASSERTION_NSURI.get().equals(qname.getNamespaceURI());
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLResponseParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLResponseParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLResponseParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -36,6 +36,7 @@
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
import org.w3c.dom.Element;
/**
@@ -44,80 +45,79 @@
* @since Nov 2, 2010
*/
public class SAMLResponseParser extends SAMLStatusResponseTypeParser implements ParserNamespaceSupport
-{
- private String RESPONSE = JBossSAMLConstants.RESPONSE.get();
+{
+ private final String RESPONSE = JBossSAMLConstants.RESPONSE.get();
+
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
//Get the startelement
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(startElement, RESPONSE );
-
- ResponseType response = parseBaseAttributes(startElement);
-
- while( xmlEventReader.hasNext() )
+ StaxParserUtil.validate(startElement, RESPONSE);
+
+ ResponseType response = (ResponseType) parseBaseAttributes(startElement);
+
+ while (xmlEventReader.hasNext())
{
//Let us peek at the next start element
- startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( startElement == null )
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
break;
- String elementName = StaxParserUtil.getStartElementName( startElement );
-
- if( JBossSAMLConstants.ISSUER.get().equals( elementName ))
+ String elementName = StaxParserUtil.getStartElementName(startElement);
+
+ if (JBossSAMLConstants.ISSUER.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
NameIDType issuer = new NameIDType();
- issuer.setValue( StaxParserUtil.getElementText( xmlEventReader ));
- response.setIssuer( issuer );
+ issuer.setValue(StaxParserUtil.getElementText(xmlEventReader));
+ response.setIssuer(issuer);
}
- else if( JBossSAMLConstants.SIGNATURE.get().equals( elementName ))
+ else if (JBossSAMLConstants.SIGNATURE.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
- StaxParserUtil.bypassElementBlock(xmlEventReader, JBossSAMLConstants.SIGNATURE.get() );
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.bypassElementBlock(xmlEventReader, JBossSAMLConstants.SIGNATURE.get());
}
- else if( JBossSAMLConstants.ASSERTION.get().equals( elementName ))
+ else if (JBossSAMLConstants.ASSERTION.get().equals(elementName))
{
- SAMLAssertionParser assertionParser = new SAMLAssertionParser();
- response.addAssertion( new RTChoiceType( (AssertionType) assertionParser.parse(xmlEventReader ) ));
+ SAMLAssertionParser assertionParser = new SAMLAssertionParser();
+ response.addAssertion(new RTChoiceType((AssertionType) assertionParser.parse(xmlEventReader)));
}
- else if( JBossSAMLConstants.STATUS.get().equals( elementName ))
+ else if (JBossSAMLConstants.STATUS.get().equals(elementName))
{
- response.setStatus( parseStatus(xmlEventReader) );
+ response.setStatus(parseStatus(xmlEventReader));
}
- else if( JBossSAMLConstants.ENCRYPTED_ASSERTION.get().equals( elementName ))
+ else if (JBossSAMLConstants.ENCRYPTED_ASSERTION.get().equals(elementName))
{
Element encryptedAssertion = StaxParserUtil.getDOMElement(xmlEventReader);
- response.addAssertion( new RTChoiceType( new EncryptedAssertionType(encryptedAssertion ) ));
+ response.addAssertion(new RTChoiceType(new EncryptedAssertionType(encryptedAssertion)));
}
else
- throw new RuntimeException( "Unknown tag=" + elementName + "::location=" + startElement.getLocation() );
+ throw new RuntimeException("Unknown tag=" + elementName + "::location=" + startElement.getLocation());
}
-
+
return response;
}
/**
* @see {@link ParserNamespaceSupport#supports(QName)}
- */
+ */
public boolean supports(QName qname)
{
- return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( qname.getNamespaceURI() )
- && RESPONSE.equals( qname.getLocalPart() );
+ return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(qname.getNamespaceURI())
+ && RESPONSE.equals(qname.getLocalPart());
}
-
+
/**
* Parse the attributes at the response element
* @param startElement
* @return
* @throws ConfigurationException
*/
- private ResponseType parseBaseAttributes( StartElement startElement ) throws ParsingException
- {
- ResponseType response = new ResponseType();
- super.parseBaseAttributes( startElement, response );
-
- return response;
- }
+ protected StatusResponseType parseBaseAttributes(StartElement startElement) throws ParsingException
+ {
+ ResponseType response = new ResponseType(super.parseBaseAttributes(startElement));
+ return response;
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloRequestParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloRequestParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloRequestParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -33,7 +33,7 @@
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
-import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.saml.v2.protocol.LogoutRequestType;
/**
@@ -47,27 +47,27 @@
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
//Get the startelement
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(startElement, LOGOUT_REQUEST.get() );
-
- LogoutRequestType logoutRequest = parseBaseAttributes( startElement );
-
- while( xmlEventReader.hasNext() )
+ StaxParserUtil.validate(startElement, LOGOUT_REQUEST.get());
+
+ LogoutRequestType logoutRequest = parseBaseAttributes(startElement);
+
+ while (xmlEventReader.hasNext())
{
//Let us peek at the next start element
- startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( startElement == null )
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
break;
- String elementName = StaxParserUtil.getStartElementName( startElement );
-
- parseCommonElements(startElement, xmlEventReader, logoutRequest );
-
- if( JBossSAMLConstants.SESSION_INDEX.get().equals( elementName ))
+ String elementName = StaxParserUtil.getStartElementName(startElement);
+
+ parseCommonElements(startElement, xmlEventReader, logoutRequest);
+
+ if (JBossSAMLConstants.SESSION_INDEX.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
- logoutRequest.getSessionIndex().add( StaxParserUtil.getElementText( xmlEventReader ) );
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ logoutRequest.getSessionIndex().add(StaxParserUtil.getElementText(xmlEventReader));
}
}
return logoutRequest;
@@ -75,33 +75,32 @@
/**
* @see {@link ParserNamespaceSupport#supports(QName)}
- */
+ */
public boolean supports(QName qname)
{
- return PROTOCOL_NSURI.get().equals( qname.getNamespaceURI() )
- && LOGOUT_REQUEST.equals( qname.getLocalPart() );
+ return PROTOCOL_NSURI.get().equals(qname.getNamespaceURI()) && LOGOUT_REQUEST.equals(qname.getLocalPart());
}
-
+
/**
* Parse the attributes at the log out request element
* @param startElement
* @return
* @throws ParsingException
*/
- private LogoutRequestType parseBaseAttributes( StartElement startElement ) throws ParsingException
- {
+ private LogoutRequestType parseBaseAttributes(StartElement startElement) throws ParsingException
+ {
super.parseRequiredAttributes(startElement);
- LogoutRequestType logoutRequest = new LogoutRequestType( id, version, issueInstant );
+ LogoutRequestType logoutRequest = new LogoutRequestType(id, issueInstant);
//Let us get the attributes
- super.parseBaseAttributes(startElement, logoutRequest );
-
- Attribute reason = startElement.getAttributeByName( new QName( "Reason" ));
- if( reason != null )
- logoutRequest.setReason( StaxParserUtil.getAttributeValue( reason ));
-
- Attribute notOnOrAfter = startElement.getAttributeByName( new QName( "NotOnOrAfter" ));
- if( notOnOrAfter != null )
- logoutRequest.setNotOnOrAfter( XMLTimeUtil.parse( StaxParserUtil.getAttributeValue( notOnOrAfter )));
- return logoutRequest;
+ super.parseBaseAttributes(startElement, logoutRequest);
+
+ Attribute reason = startElement.getAttributeByName(new QName("Reason"));
+ if (reason != null)
+ logoutRequest.setReason(StaxParserUtil.getAttributeValue(reason));
+
+ Attribute notOnOrAfter = startElement.getAttributeByName(new QName("NotOnOrAfter"));
+ if (notOnOrAfter != null)
+ logoutRequest.setNotOnOrAfter(XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(notOnOrAfter)));
+ return logoutRequest;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloResponseParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloResponseParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSloResponseParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -21,14 +21,12 @@
*/
package org.picketlink.identity.federation.core.parsers.saml;
-
import static org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants.LOGOUT_RESPONSE;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.events.StartElement;
-import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
@@ -46,61 +44,47 @@
{
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
//Get the startelement
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(startElement, LOGOUT_RESPONSE.get() );
+ StaxParserUtil.validate(startElement, LOGOUT_RESPONSE.get());
- StatusResponseType response = parseBaseAttributes(startElement);
+ StatusResponseType response = parseBaseAttributes(startElement);
- while( xmlEventReader.hasNext() )
+ while (xmlEventReader.hasNext())
{
//Let us peek at the next start element
- startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( startElement == null )
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
break;
- String elementName = StaxParserUtil.getStartElementName( startElement );
+ String elementName = StaxParserUtil.getStartElementName(startElement);
- if( JBossSAMLConstants.ISSUER.get().equals( elementName ))
+ if (JBossSAMLConstants.ISSUER.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
NameIDType issuer = new NameIDType();
- issuer.setValue( StaxParserUtil.getElementText( xmlEventReader ));
- response.setIssuer( issuer );
+ issuer.setValue(StaxParserUtil.getElementText(xmlEventReader));
+ response.setIssuer(issuer);
}
- else if( JBossSAMLConstants.SIGNATURE.get().equals( elementName ))
+ else if (JBossSAMLConstants.SIGNATURE.get().equals(elementName))
{
- startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
- StaxParserUtil.bypassElementBlock(xmlEventReader, JBossSAMLConstants.SIGNATURE.get() );
- }
- else if( JBossSAMLConstants.STATUS.get().equals( elementName ))
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.bypassElementBlock(xmlEventReader, JBossSAMLConstants.SIGNATURE.get());
+ }
+ else if (JBossSAMLConstants.STATUS.get().equals(elementName))
{
- response.setStatus( parseStatus(xmlEventReader) );
+ response.setStatus(parseStatus(xmlEventReader));
}
}
return response;
}
/**
- * Parse the attributes at the response element
- * @param startElement
- * @return
- * @throws ConfigurationException
- */
- private StatusResponseType parseBaseAttributes( StartElement startElement ) throws ParsingException
- {
- StatusResponseType response = new StatusResponseType();
- super.parseBaseAttributes( startElement, response );
-
- return response;
- }
-
- /**
* @see {@link ParserNamespaceSupport#supports(QName)}
- */
+ */
public boolean supports(QName qname)
{
- return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals( qname.getNamespaceURI() )
- && LOGOUT_RESPONSE.equals( qname.getLocalPart() );
+ return JBossSAMLURIConstants.PROTOCOL_NSURI.get().equals(qname.getNamespaceURI())
+ && LOGOUT_RESPONSE.equals(qname.getLocalPart());
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -23,6 +23,7 @@
import java.net.URI;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.events.Attribute;
@@ -34,6 +35,7 @@
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.saml.v2.protocol.StatusCodeType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusType;
@@ -51,23 +53,26 @@
* @param response
* @throws ParsingException
*/
- protected void parseBaseAttributes(StartElement startElement, StatusResponseType response) throws ParsingException
+ protected StatusResponseType parseBaseAttributes(StartElement startElement) throws ParsingException
{
Attribute idAttr = startElement.getAttributeByName(new QName("ID"));
if (idAttr == null)
throw new RuntimeException("ID attribute is missing");
- response.setID(StaxParserUtil.getAttributeValue(idAttr));
+ String id = StaxParserUtil.getAttributeValue(idAttr);
Attribute version = startElement.getAttributeByName(new QName("Version"));
if (version == null)
throw new RuntimeException("Version attribute required in Response");
- response.setVersion(StaxParserUtil.getAttributeValue(version));
+ StringUtil.match(JBossSAMLConstants.VERSION_2_0.get(), StaxParserUtil.getAttributeValue(version));
+
Attribute issueInstant = startElement.getAttributeByName(new QName("IssueInstant"));
if (issueInstant == null)
throw new RuntimeException("IssueInstant attribute required in Response");
- response.setIssueInstant(XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstant)));
+ XMLGregorianCalendar issueInstantVal = XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstant));
+ StatusResponseType response = new StatusResponseType(id, issueInstantVal);
+
Attribute destination = startElement.getAttributeByName(new QName("Destination"));
if (destination != null)
response.setDestination(StaxParserUtil.getAttributeValue(destination));
@@ -79,6 +84,7 @@
Attribute inResponseTo = startElement.getAttributeByName(new QName("InResponseTo"));
if (inResponseTo != null)
response.setInResponseTo(StaxParserUtil.getAttributeValue(inResponseTo));
+ return response;
}
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/xacml/SAMLXACMLRequestParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/xacml/SAMLXACMLRequestParser.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/xacml/SAMLXACMLRequestParser.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -46,91 +46,94 @@
* @since Dec 16, 2010
*/
public class SAMLXACMLRequestParser extends SAMLRequestAbstractParser implements ParserNamespaceSupport
-{
- public Object parse( XMLEventReader xmlEventReader ) throws ParsingException
+{
+ public Object parse(XMLEventReader xmlEventReader) throws ParsingException
{
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
String tag = StaxParserUtil.getStartElementName(startElement);
- if( tag.equals( JBossSAMLConstants.REQUEST_ABSTRACT.get() ))
+ if (tag.equals(JBossSAMLConstants.REQUEST_ABSTRACT.get()))
{
String xsiTypeValue = StaxParserUtil.getXSITypeValue(startElement);
- if( xsiTypeValue.contains( JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY_TYPE.get() ))
+ if (xsiTypeValue.contains(JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY_TYPE.get()))
{
- return parseXACMLAuthzDecisionQuery( startElement, xmlEventReader );
+ return parseXACMLAuthzDecisionQuery(startElement, xmlEventReader);
}
- else throw new RuntimeException( "Unknown xsi:type=" + xsiTypeValue );
+ else
+ throw new RuntimeException("Unknown xsi:type=" + xsiTypeValue);
}
- else if( tag.equals( JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get() ))
+ else if (tag.equals(JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get()))
{
return parseXACMLAuthzDecisionQuery(startElement, xmlEventReader);
}
-
- throw new RuntimeException( "Parsing Failed: Unknown Tag=" + tag + "::location=" + startElement.getLocation() );
+
+ throw new RuntimeException("Parsing Failed: Unknown Tag=" + tag + "::location=" + startElement.getLocation());
}
public boolean supports(QName qname)
{
return false;
}
-
+
@SuppressWarnings("unchecked")
- private XACMLAuthzDecisionQueryType parseXACMLAuthzDecisionQuery( StartElement startElement,
- XMLEventReader xmlEventReader ) throws ParsingException
+ private XACMLAuthzDecisionQueryType parseXACMLAuthzDecisionQuery(StartElement startElement,
+ XMLEventReader xmlEventReader) throws ParsingException
{
- super.parseRequiredAttributes( startElement );
-
- XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, version, issueInstant );
- super.parseBaseAttributes( startElement, xacmlQuery );
-
- String inputContextOnly = StaxParserUtil.getAttributeValue(startElement, JBossSAMLConstants.INPUT_CONTEXT_ONLY.get() );
- if( inputContextOnly != null )
+ super.parseRequiredAttributes(startElement);
+
+ XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant);
+ super.parseBaseAttributes(startElement, xacmlQuery);
+
+ String inputContextOnly = StaxParserUtil.getAttributeValue(startElement,
+ JBossSAMLConstants.INPUT_CONTEXT_ONLY.get());
+ if (inputContextOnly != null)
{
- xacmlQuery.setInputContextOnly( Boolean.parseBoolean( inputContextOnly ));
+ xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly));
}
- String returnContext = StaxParserUtil.getAttributeValue(startElement, JBossSAMLConstants.RETURN_CONTEXT.get() );
- if( returnContext != null )
+ String returnContext = StaxParserUtil.getAttributeValue(startElement, JBossSAMLConstants.RETURN_CONTEXT.get());
+ if (returnContext != null)
{
- xacmlQuery.setReturnContext( Boolean.parseBoolean( returnContext ));
+ xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext));
}
-
+
//Go thru the children
- while( xmlEventReader.hasNext() )
+ while (xmlEventReader.hasNext())
{
XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
- if( xmlEvent instanceof EndElement )
+ if (xmlEvent instanceof EndElement)
{
EndElement endElement = (EndElement) xmlEvent;
- if( ! (StaxParserUtil.matches(endElement, JBossSAMLConstants.REQUEST_ABSTRACT.get() )
- || StaxParserUtil.matches(endElement, JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get() ) ))
- throw new ParsingException( "Expected endelement RequestAbstract or XACMLAuthzDecisionQuery" );
+ if (!(StaxParserUtil.matches(endElement, JBossSAMLConstants.REQUEST_ABSTRACT.get()) || StaxParserUtil
+ .matches(endElement, JBossSAMLConstants.XACML_AUTHZ_DECISION_QUERY.get())))
+ throw new ParsingException("Expected endelement RequestAbstract or XACMLAuthzDecisionQuery");
break;
}
- startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( startElement == null )
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
break;
- super.parseCommonElements(startElement, xmlEventReader, xacmlQuery);
+ super.parseCommonElements(startElement, xmlEventReader, xacmlQuery);
String tag = StaxParserUtil.getStartElementName(startElement);
-
- if( tag.equals( JBossSAMLConstants.REQUEST.get() ))
+
+ if (tag.equals(JBossSAMLConstants.REQUEST.get()))
{
Element xacmlRequest = StaxParserUtil.getDOMElement(xmlEventReader);
//xacml request
- String xacmlPath = "org.jboss.security.xacml.core.model.context";
+ String xacmlPath = "org.jboss.security.xacml.core.model.context";
try
{
- JAXBContext jaxb = JAXBContext.newInstance( xacmlPath );
+ JAXBContext jaxb = JAXBContext.newInstance(xacmlPath);
Unmarshaller un = jaxb.createUnmarshaller();
un.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
- JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal( DocumentUtil.getNodeAsStream(xacmlRequest));
+ JAXBElement<RequestType> jaxbRequestType = (JAXBElement<RequestType>) un.unmarshal(DocumentUtil
+ .getNodeAsStream(xacmlRequest));
RequestType req = jaxbRequestType.getValue();
xacmlQuery.setRequest(req);
}
- catch ( Exception e)
+ catch (Exception e)
{
- throw new ParsingException( e );
- }
- }
+ throw new ParsingException(e);
+ }
+ }
}
- return xacmlQuery;
+ return xacmlQuery;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/util/SAMLParserUtil.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -35,11 +35,17 @@
import javax.xml.stream.events.XMLEvent;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.parsers.saml.SAML11SubjectParser;
+import org.picketlink.identity.federation.core.saml.v1.SAML11Constants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.core.util.StringUtil;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
import org.picketlink.identity.federation.saml.v2.assertion.AuthnContextClassRefType;
import org.picketlink.identity.federation.saml.v2.assertion.AuthnContextDeclRefType;
@@ -47,7 +53,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.AuthnStatementType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectLocalityType;
-import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
/**
* Utility methods for SAML Parser
@@ -365,6 +370,101 @@
}
/**
+ * Parse the AuthnStatement inside the assertion
+ * @param xmlEventReader
+ * @return
+ * @throws ParsingException
+ */
+ public static SAML11AuthenticationStatementType parseAuthenticationStatement(XMLEventReader xmlEventReader)
+ throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+
+ StaxParserUtil.validate(startElement, SAML11Constants.AUTHENTICATION_STATEMENT);
+
+ Attribute authMethod = startElement.getAttributeByName(new QName(SAML11Constants.AUTHENTICATION_METHOD));
+ if (authMethod == null)
+ throw new ParsingException(SAML11Constants.AUTHENTICATION_METHOD + " attribute needed");
+
+ Attribute authInstant = startElement.getAttributeByName(new QName(SAML11Constants.AUTHENTICATION_INSTANT));
+ if (authInstant == null)
+ throw new ParsingException(SAML11Constants.AUTHENTICATION_INSTANT + " attribute needed");
+
+ SAML11AuthenticationStatementType authStat = new SAML11AuthenticationStatementType(URI.create(StaxParserUtil
+ .getAttributeValue(authMethod)), XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(authInstant)));
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
+ break;
+
+ if (xmlEvent instanceof EndElement)
+ {
+ xmlEvent = StaxParserUtil.getNextEvent(xmlEventReader);
+ EndElement endElement = (EndElement) xmlEvent;
+ String endElementTag = StaxParserUtil.getEndElementName(endElement);
+ if (endElementTag.equals(SAML11Constants.AUTHENTICATION_STATEMENT))
+ break;
+ else
+ throw new RuntimeException("Unknown End Element:" + endElementTag);
+ }
+ startElement = null;
+
+ if (xmlEvent instanceof StartElement)
+ {
+ startElement = (StartElement) xmlEvent;
+ }
+ else
+ {
+ startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ }
+ if (startElement == null)
+ break;
+
+ String tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (JBossSAMLConstants.SUBJECT.get().equalsIgnoreCase(tag))
+ {
+ SAML11SubjectParser subjectParser = new SAML11SubjectParser();
+ SAML11SubjectType subject = (SAML11SubjectType) subjectParser.parse(xmlEventReader);
+ SAML11SubjectStatementType subStat = new SAML11SubjectStatementType();
+ subStat.setSubject(subject);
+
+ authStat.setSubject(subject);
+ }
+
+ /*if (JBossSAMLConstants.SUBJECT_LOCALITY.get().equals(tag))
+ {
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ SubjectLocalityType subjectLocalityType = new SubjectLocalityType();
+ Attribute address = startElement.getAttributeByName(new QName(JBossSAMLConstants.ADDRESS.get()));
+ if (address != null)
+ {
+ subjectLocalityType.setAddress(StaxParserUtil.getAttributeValue(address));
+ }
+ Attribute dns = startElement.getAttributeByName(new QName(JBossSAMLConstants.DNS_NAME.get()));
+ if (dns != null)
+ {
+ subjectLocalityType.setDNSName(StaxParserUtil.getAttributeValue(dns));
+ }
+ authnStatementType.setSubjectLocality(subjectLocalityType);
+ StaxParserUtil.validate(StaxParserUtil.getNextEndElement(xmlEventReader),
+ JBossSAMLConstants.SUBJECT_LOCALITY.get());
+ }
+ else if (JBossSAMLConstants.AUTHN_CONTEXT.get().equals(tag))
+ {
+ authnStatementType.setAuthnContext(parseAuthnContextType(xmlEventReader));
+ }*/
+ else
+ throw new RuntimeException("Unknown tag:" + tag + "::Location=" + startElement.getLocation());
+
+ }
+
+ return authStat;
+ }
+
+ /**
* Parse a {@code NameIDType}
* @param xmlEventReader
* @return
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v1/SAML11Constants.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.core.saml.v1;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public interface SAML11Constants
+{
+ String ASSERTIONID = "AssertionID";
+
+ String ASSERTION_11_NSURI = "urn:oasis:names:tc:SAML:1.0:assertion";
+
+ String AUTHENTICATION_INSTANT = "AuthenticationInstant";
+
+ String AUTHENTICATION_METHOD = "AuthenticationMethod";
+
+ String AUTHENTICATION_STATEMENT = "AuthenticationStatement";
+
+ String CONFIRMATION_METHOD = "ConfirmationMethod";
+
+ String FORMAT = "Format";
+
+ String ISSUER = "Issuer";
+
+ String MAJOR_VERSION = "MajorVersion";
+
+ String MINOR_VERSION = "MinorVersion";
+
+ String NAME_IDENTIFIER = "NameIdentifier";
+}
\ No newline at end of file
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-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLConstants.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -31,7 +31,7 @@
ADDRESS( "Address" ),
ALLOW_CREATE( "AllowCreate" ),
ARTIFACT_RESOLUTION_SERVICE( "ArtifactResolutionService" ),
- ASSERTION( "Assertion" ),
+ ASSERTION( "Assertion" ),
ASSERTION_CONSUMER_SERVICE( "AssertionConsumerService" ),
ASSERTION_CONSUMER_SERVICE_URL( "AssertionConsumerServiceURL" ),
ASSERTION_CONSUMER_SERVICE_INDEX( "AssertionConsumerServiceIndex" ),
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLURIConstants.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLURIConstants.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/constants/JBossSAMLURIConstants.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -67,6 +67,8 @@
SAML_HTTP_POST_BINDING("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"),
SAML_HTTP_REDIRECT_BINDING("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"),
+ SAML_11_NS("urn:oasis:names:tc:SAML:1.0:assertion"),
+
SUBJECT_CONFIRMATION_BEARER("urn:oasis:names:tc:SAML:2.0:cm:bearer"),
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnResponseFactory.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnResponseFactory.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnResponseFactory.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -41,9 +41,9 @@
import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusCodeType;
import org.picketlink.identity.federation.saml.v2.protocol.StatusType;
-import org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType;
import org.w3c.dom.Element;
/**
@@ -52,7 +52,7 @@
* @since Dec 9, 2008
*/
public class JBossSAMLAuthnResponseFactory
-{
+{
/**
* Create a StatusType given the status code uri
* @param statusCodeURI
@@ -60,24 +60,15 @@
*/
public static StatusType createStatusType(String statusCodeURI)
{
- StatusCodeType sct = new StatusCodeType();
- sct.setValue( URI.create( statusCodeURI ));
-
- StatusType statusType = new StatusType();
+ StatusCodeType sct = new StatusCodeType();
+ sct.setValue(URI.create(statusCodeURI));
+
+ StatusType statusType = new StatusType();
statusType.setStatusCode(sct);
return statusType;
}
-
+
/**
- * Create an empty response type
- * @return
- */
- public static ResponseType createResponseType()
- {
- return new ResponseType();
- }
-
- /**
* Create a ResponseType
* @param ID id of the response
* @param sp holder with the information about the Service Provider
@@ -86,54 +77,53 @@
* @return
* @throws ConfigurationException
*/
- public static ResponseType createResponseType(String ID, SPInfoHolder sp, IDPInfoHolder idp,
- IssuerInfoHolder issuerInfo) throws ConfigurationException
- {
+ public static ResponseType createResponseType(String ID, SPInfoHolder sp, IDPInfoHolder idp,
+ IssuerInfoHolder issuerInfo) throws ConfigurationException
+ {
String responseDestinationURI = sp.getResponseDestinationURI();
-
- XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
-
+
+ XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
+
//Create an assertion
- String id = IDGenerator.create( "ID_" );
-
+ String id = IDGenerator.create("ID_");
+
//Create assertion -> subject
SubjectType subjectType = new SubjectType();
-
+
//subject -> nameid
NameIDType nameIDType = new NameIDType();
- nameIDType.setFormat( URI.create( idp.getNameIDFormat() ));
+ nameIDType.setFormat(URI.create(idp.getNameIDFormat()));
nameIDType.setValue(idp.getNameIDFormatValue());
-
+
SubjectType.STSubType subType = new SubjectType.STSubType();
- subType.addBaseID(nameIDType);
+ subType.addBaseID(nameIDType);
subjectType.setSubType(subType);
-
- SubjectConfirmationType subjectConfirmation = new SubjectConfirmationType();
- subjectConfirmation.setMethod( idp.getSubjectConfirmationMethod());
-
+
+ SubjectConfirmationType subjectConfirmation = new SubjectConfirmationType();
+ subjectConfirmation.setMethod(idp.getSubjectConfirmationMethod());
+
SubjectConfirmationDataType subjectConfirmationData = new SubjectConfirmationDataType();
- subjectConfirmationData.setInResponseTo( sp.getRequestID() );
- subjectConfirmationData.setRecipient( responseDestinationURI );
+ subjectConfirmationData.setInResponseTo(sp.getRequestID());
+ subjectConfirmationData.setRecipient(responseDestinationURI);
subjectConfirmationData.setNotBefore(issueInstant);
subjectConfirmationData.setNotOnOrAfter(issueInstant);
-
+
subjectConfirmation.setSubjectConfirmationData(subjectConfirmationData);
subjectType.addConfirmation(subjectConfirmation);
-
- AssertionType assertionType = SAMLAssertionFactory.createAssertion(id,
- nameIDType , issueInstant, (ConditionsType) null, subjectType, (List<StatementAbstractType>)null );
-
-
- ResponseType responseType = createResponseType(ID, issuerInfo, assertionType);
+
+ AssertionType assertionType = SAMLAssertionFactory.createAssertion(id, nameIDType, issueInstant,
+ (ConditionsType) null, subjectType, (List<StatementAbstractType>) null);
+
+ ResponseType responseType = createResponseType(ID, issuerInfo, assertionType);
//InResponseTo ID
responseType.setInResponseTo(sp.getRequestID());
//Destination
responseType.setDestination(responseDestinationURI);
-
+
return responseType;
- }
-
+ }
+
/**
* Create a Response Type
* @param ID
@@ -142,35 +132,27 @@
* @return
* @throws ConfigurationException
*/
- public static ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, AssertionType assertionType)
- throws ConfigurationException
+ public static ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, AssertionType assertionType)
+ throws ConfigurationException
{
- ResponseType responseType = new ResponseType();
- responseType.setVersion(issuerInfo.getSamlVersion());
-
- //ID
- responseType.setID(ID);
-
+ XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
+ ResponseType responseType = new ResponseType(ID, issueInstant);
+
//Issuer
NameIDType issuer = issuerInfo.getIssuer();
responseType.setIssuer(issuer);
-
+
//Status
String statusCode = issuerInfo.getStatusCode();
- if(statusCode == null)
+ if (statusCode == null)
throw new IllegalArgumentException("issuerInfo missing status code");
-
- responseType.setStatus(createStatusType(statusCode) );
-
- XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
-
- //IssueInstant
- responseType.setIssueInstant(issueInstant);
-
- responseType.addAssertion( new RTChoiceType( assertionType ));
- return responseType;
- }
-
+
+ responseType.setStatus(createStatusType(statusCode));
+
+ responseType.addAssertion(new RTChoiceType(assertionType));
+ return responseType;
+ }
+
/**
* Create a Response Type
* @param ID
@@ -179,33 +161,23 @@
* @return
* @throws ConfigurationException
*/
- public static ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, Element encryptedAssertion )
- throws ConfigurationException
+ public static ResponseType createResponseType(String ID, IssuerInfoHolder issuerInfo, Element encryptedAssertion)
+ throws ConfigurationException
{
- ResponseType responseType = new ResponseType();
- responseType.setVersion(issuerInfo.getSamlVersion());
-
- //ID
- responseType.setID(ID);
-
+ ResponseType responseType = new ResponseType(ID, XMLTimeUtil.getIssueInstant());
+
//Issuer
NameIDType issuer = issuerInfo.getIssuer();
responseType.setIssuer(issuer);
-
+
//Status
String statusCode = issuerInfo.getStatusCode();
- if(statusCode == null)
+ if (statusCode == null)
throw new IllegalArgumentException("issuerInfo missing status code");
-
- responseType.setStatus(createStatusType(statusCode) );
-
- XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
-
- //IssueInstant
- responseType.setIssueInstant(issueInstant);
-
-
- responseType.addAssertion( new RTChoiceType( new EncryptedAssertionType( encryptedAssertion ) ));
- return responseType;
- }
+
+ responseType.setStatus(createStatusType(statusCode));
+
+ responseType.addAssertion(new RTChoiceType(new EncryptedAssertionType(encryptedAssertion)));
+ return responseType;
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/SAMLAssertionFactory.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/SAMLAssertionFactory.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/SAMLAssertionFactory.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -26,7 +26,6 @@
import javax.xml.datatype.XMLGregorianCalendar;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.AudienceRestrictionType;
import org.picketlink.identity.federation.saml.v2.assertion.ConditionAbstractType;
@@ -45,7 +44,7 @@
* @since Jan 28, 2009
*/
public class SAMLAssertionFactory
-{
+{
/**
* <p>
* Creates an {@code AudienceRestrictionType} with the specified values.
@@ -57,12 +56,12 @@
public static AudienceRestrictionType createAudienceRestriction(String... values)
{
AudienceRestrictionType audienceRestriction = new AudienceRestrictionType();
- if ( values != null )
+ if (values != null)
{
- for( String val: values )
+ for (String val : values)
{
- audienceRestriction.addAudience( URI.create( val ) );
- }
+ audienceRestriction.addAudience(URI.create(val));
+ }
}
return audienceRestriction;
}
@@ -80,8 +79,8 @@
public static NameIDType createNameID(String format, String qualifier, String value)
{
NameIDType nameID = new NameIDType();
- if( format != null )
- nameID.setFormat( URI.create( format ));
+ if (format != null)
+ nameID.setFormat(URI.create(format));
nameID.setNameQualifier(qualifier);
nameID.setValue(value);
return nameID;
@@ -103,14 +102,14 @@
ConditionsType conditions = new ConditionsType();
conditions.setNotBefore(notBefore);
conditions.setNotOnOrAfter(notOnOrAfter);
- if ( restrictions != null )
+ if (restrictions != null)
{
- for( ConditionAbstractType condition : restrictions )
+ for (ConditionAbstractType condition : restrictions)
{
conditions.addCondition(condition);
}
-
- }
+
+ }
return conditions;
}
@@ -124,11 +123,11 @@
*/
public static KeyInfoConfirmationDataType createKeyInfoConfirmation(KeyInfoType keyInfo)
{
- KeyInfoConfirmationDataType type = new KeyInfoConfirmationDataType();
- type.setAnyType( keyInfo );
+ KeyInfoConfirmationDataType type = new KeyInfoConfirmationDataType();
+ type.setAnyType(keyInfo);
return type;
}
-
+
/**
* <p>
* Creates a {@code SubjectConfirmationType} object with the specified values.
@@ -161,17 +160,17 @@
*/
public static SubjectType createSubject(NameIDType nameID, SubjectConfirmationType confirmation)
{
- SubjectType subject = new SubjectType();
+ SubjectType subject = new SubjectType();
if (nameID != null)
{
- SubjectType.STSubType subType = new SubjectType.STSubType();
+ SubjectType.STSubType subType = new SubjectType.STSubType();
subType.addConfirmation(confirmation);
subType.addBaseID(nameID);
subject.setSubType(subType);
- }
+ }
return subject;
- }
-
+ }
+
/**
* <p>
* Creates a SAMLV2 {@code AssertionType} with the specified values.
@@ -189,20 +188,20 @@
public static AssertionType createAssertion(String id, NameIDType issuerID, XMLGregorianCalendar issueInstant,
ConditionsType conditions, SubjectType subject, List<StatementAbstractType> statements)
{
- AssertionType assertion = new AssertionType( id, issueInstant, JBossSAMLConstants.VERSION_2_0.get() );
- assertion.setIssuer(issuerID);
- if(conditions != null)
- assertion.setConditions(conditions);
- if(subject != null)
- assertion.setSubject(subject);
-
- if ( statements != null )
+ AssertionType assertion = new AssertionType(id, issueInstant);
+ assertion.setIssuer(issuerID);
+ if (conditions != null)
+ assertion.setConditions(conditions);
+ if (subject != null)
+ assertion.setSubject(subject);
+
+ if (statements != null)
{
- for( StatementAbstractType statement: statements )
+ for (StatementAbstractType statement : statements)
{
assertion.addStatement(statement);
}
- }
+ }
return assertion;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -32,19 +32,18 @@
import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.exceptions.IssueInstantMissingException;
import org.picketlink.identity.federation.core.saml.v2.writers.SAMLAssertionWriter;
import org.picketlink.identity.federation.core.util.StaxUtil;
import org.picketlink.identity.federation.core.util.XMLSignatureUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
import org.picketlink.identity.federation.saml.v2.assertion.ConditionsType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.identity.federation.saml.v2.assertion.StatementAbstractType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
-import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType.STSubType;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -92,7 +91,7 @@
{
throw new RuntimeException(e);
}
- AssertionType assertion = new AssertionType(id, issueInstant, JBossSAMLConstants.VERSION_2_0.get());
+ AssertionType assertion = new AssertionType(id, issueInstant);
assertion.setIssuer(issuer);
return assertion;
}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -121,6 +121,17 @@
}
/**
+ * Match two strings else throw a {@link RuntimeException}
+ * @param first
+ * @param second
+ */
+ public static void match(String first, String second)
+ {
+ if (first.equals(second) == false)
+ throw new RuntimeException(first + " does not match with " + second);
+ }
+
+ /**
* Given a comma separated string, get the tokens as a {@link List}
* @param str
* @return
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/identity/federation/core/wstrust/auth/Util.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/identity/federation/core/wstrust/auth/Util.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/identity/federation/core/wstrust/auth/Util.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -23,11 +23,9 @@
import java.util.HashMap;
import java.util.Map;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.factories.JBossSAMLBaseFactory;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
-import org.picketlink.identity.federation.core.wstrust.auth.AbstractSTSLoginModule;
-import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
+import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.w3c.dom.Element;
@@ -39,23 +37,22 @@
*/
public final class Util
{
- private Util()
- {
- }
-
- public static Element createSamlToken() throws Exception
- {
- String id = "ID+" + JBossSAMLBaseFactory.createUUID();
- final AssertionType assertionType = new AssertionType( id, XMLTimeUtil.getIssueInstant(),
- JBossSAMLConstants.VERSION_2_0.get() );
- return SAMLUtil.toElement(assertionType);
- }
-
- public static Map<String, String> allOptions()
- {
- Map<String, String> options = new HashMap<String, String>();
- options.put(AbstractSTSLoginModule.STS_CONFIG_FILE, "wstrust/auth/jboss-sts-client.properties");
- return options;
- }
+ private Util()
+ {
+ }
+ public static Element createSamlToken() throws Exception
+ {
+ String id = "ID+" + JBossSAMLBaseFactory.createUUID();
+ final AssertionType assertionType = new AssertionType(id, XMLTimeUtil.getIssueInstant());
+ return SAMLUtil.toElement(assertionType);
+ }
+
+ public static Map<String, String> allOptions()
+ {
+ Map<String, String> options = new HashMap<String, String>();
+ options.put(AbstractSTSLoginModule.STS_CONFIG_FILE, "wstrust/auth/jboss-sts-client.properties");
+ return options;
+ }
+
}
Added: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAML11AssertionParserTestCase.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.test.identity.federation.core.parser.saml;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.InputStream;
+import java.net.URI;
+
+import org.junit.Test;
+import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
+import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AuthenticationStatementType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ConditionsType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectConfirmationType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+
+/**
+ * Unit Test the parsing of SAML 1.1 assertion
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 21, 2011
+ */
+public class SAML11AssertionParserTestCase
+{
+ @Test
+ public void testSAML11Assertion() throws Exception
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream configStream = tcl.getResourceAsStream("parser/saml1/saml1-assertion.xml");
+
+ SAMLParser parser = new SAMLParser();
+ SAML11AssertionType assertion = (SAML11AssertionType) parser.parse(configStream);
+ assertNotNull(assertion);
+
+ //Validate assertion
+ assertEquals(1, assertion.getMajorVersion());
+ assertEquals(1, assertion.getMinorVersion());
+ assertEquals("buGxcG4gILg5NlocyLccDz6iXrUa", assertion.getID());
+ assertEquals("https://idp.example.org/saml", assertion.getIssuer());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:37.795Z"), assertion.getIssueInstant());
+
+ SAML11ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:00:37.795Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:10:37.795Z"), conditions.getNotOnOrAfter());
+
+ SAML11AuthenticationStatementType stat = (SAML11AuthenticationStatementType) assertion.getStatements().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:am:password", stat.getAuthenticationMethod().toString());
+ assertEquals(XMLTimeUtil.parse("2002-06-19T17:05:17.706Z"), stat.getAuthenticationInstant());
+
+ SAML11SubjectType subject = stat.getSubject();
+ SAML11SubjectType.SAML11SubjectTypeChoice choice = subject.getChoice();
+ assertEquals("user(a)idp.example.org", choice.getNameID().getNameQualifier());
+ assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", choice.getNameID().getFormat().toString());
+
+ SAML11SubjectConfirmationType subjectConfirm = subject.getSubjectConfirmation();
+ URI confirmationMethod = subjectConfirm.getConfirmationMethod().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:1.0:cm:bearer", confirmationMethod.toString());
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -43,6 +43,7 @@
import org.picketlink.identity.federation.core.util.StaxUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
import org.picketlink.identity.federation.saml.v2.assertion.AudienceRestrictionType;
import org.picketlink.identity.federation.saml.v2.assertion.AuthnStatementType;
@@ -52,7 +53,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationDataType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
-import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType.STSubType;
/**
@@ -64,31 +64,31 @@
{
@Test
public void testSAMLAssertionParsing() throws Exception
- {
+ {
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
- InputStream configStream = tcl.getResourceAsStream( "parser/saml2/saml2-assertion.xml" );
+ InputStream configStream = tcl.getResourceAsStream("parser/saml2/saml2-assertion.xml");
SAMLParser parser = new SAMLParser();
AssertionType assertion = (AssertionType) parser.parse(configStream);
- assertNotNull( assertion );
+ assertNotNull(assertion);
- assertEquals( "ID_ab0392ef-b557-4453-95a8-a7e168da8ac5", assertion.getID() );
- assertEquals( XMLTimeUtil.parse( "2010-09-30T19:13:37.869Z" ), assertion.getIssueInstant() );
+ assertEquals("ID_ab0392ef-b557-4453-95a8-a7e168da8ac5", assertion.getID());
+ assertEquals(XMLTimeUtil.parse("2010-09-30T19:13:37.869Z"), assertion.getIssueInstant());
//Issuer
- assertEquals( "Test STS", assertion.getIssuer().getValue() );
+ assertEquals("Test STS", assertion.getIssuer().getValue());
//Subject
SubjectType subject = assertion.getSubject();
-
+
STSubType subType = subject.getSubType();
NameIDType subjectNameID = (NameIDType) subType.getBaseID();
- assertEquals( "jduke", subjectNameID.getValue() );
- assertEquals( "urn:picketlink:identity-federation", subjectNameID.getNameQualifier() );
-
- ConditionsType conditions = assertion.getConditions();
- assertEquals( XMLTimeUtil.parse( "2010-09-30T19:13:37.869Z" ) , conditions.getNotBefore() );
- assertEquals( XMLTimeUtil.parse( "2010-09-30T21:13:37.869Z" ) , conditions.getNotOnOrAfter() );
-
+ assertEquals("jduke", subjectNameID.getValue());
+ assertEquals("urn:picketlink:identity-federation", subjectNameID.getNameQualifier());
+
+ ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2010-09-30T19:13:37.869Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2010-09-30T21:13:37.869Z"), conditions.getNotOnOrAfter());
+
/*List<JAXBElement<?>> content = subject.getContent();
int size = content.size();
@@ -112,152 +112,118 @@
assertEquals( XMLTimeUtil.parse( "2010-09-30T21:13:37.869Z" ) , conditions.getNotOnOrAfter() );
}
} */
- }
+ }
-
/**
* This test validates the parsing of audience restrictions inside the conditions
* @throws Exception
*/
@Test
public void testSAMLAssertionParsingWithAudienceRestriction() throws Exception
- {
+ {
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
- InputStream configStream = tcl.getResourceAsStream( "parser/saml2/saml2-assertion-audiencerestriction.xml" );
+ InputStream configStream = tcl.getResourceAsStream("parser/saml2/saml2-assertion-audiencerestriction.xml");
SAMLParser parser = new SAMLParser();
AssertionType assertion = (AssertionType) parser.parse(configStream);
- assertNotNull( assertion );
+ assertNotNull(assertion);
- assertEquals( "ID_cf9efbf0-9d7f-4b4a-b77f-d83ecaafd374", assertion.getID() );
- assertEquals( XMLTimeUtil.parse( "2010-09-30T19:13:37.911Z" ), assertion.getIssueInstant() );
- assertEquals( "2.0", assertion.getVersion() );
+ assertEquals("ID_cf9efbf0-9d7f-4b4a-b77f-d83ecaafd374", assertion.getID());
+ assertEquals(XMLTimeUtil.parse("2010-09-30T19:13:37.911Z"), assertion.getIssueInstant());
+ assertEquals("2.0", assertion.getVersion());
//Issuer
- assertEquals( "Test STS", assertion.getIssuer().getValue() );
+ assertEquals("Test STS", assertion.getIssuer().getValue());
//Subject
SubjectType subject = assertion.getSubject();
-
+
STSubType subType = subject.getSubType();
NameIDType subjectNameID = (NameIDType) subType.getBaseID();
- assertEquals( "jduke", subjectNameID.getValue() );
- assertEquals( "urn:picketlink:identity-federation", subjectNameID.getNameQualifier() );
-
- SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0 );
- assertEquals( "urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod() );
-
- ConditionsType conditions = assertion.getConditions();
- assertEquals( XMLTimeUtil.parse( "2010-09-30T19:13:37.911Z" ) , conditions.getNotBefore() );
- assertEquals( XMLTimeUtil.parse( "2010-09-30T21:13:37.911Z" ) , conditions.getNotOnOrAfter() );
-
- AudienceRestrictionType audienceRestrictionType = (AudienceRestrictionType) conditions.getConditions().get(0);
- assertEquals( 1, audienceRestrictionType.getAudience().size() );
- assertEquals( "http://services.testcorp.org/provider2", audienceRestrictionType.getAudience().get( 0 ).toASCIIString());
-
- /*List<JAXBElement<?>> content = subject.getContent();
+ assertEquals("jduke", subjectNameID.getValue());
+ assertEquals("urn:picketlink:identity-federation", subjectNameID.getNameQualifier());
- int size = content.size();
+ SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod());
- for( int i = 0 ; i < size; i++ )
- {
- JAXBElement<?> node = content.get(i);
- if( node.getDeclaredType().equals( NameIDType.class ))
- {
- NameIDType subjectNameID = (NameIDType) node.getValue();
+ ConditionsType conditions = assertion.getConditions();
+ assertEquals(XMLTimeUtil.parse("2010-09-30T19:13:37.911Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2010-09-30T21:13:37.911Z"), conditions.getNotOnOrAfter());
- assertEquals( "jduke", subjectNameID.getValue() );
- assertEquals( "urn:picketlink:identity-federation", subjectNameID.getNameQualifier() );
- }
+ AudienceRestrictionType audienceRestrictionType = (AudienceRestrictionType) conditions.getConditions().get(0);
+ assertEquals(1, audienceRestrictionType.getAudience().size());
+ assertEquals("http://services.testcorp.org/provider2", audienceRestrictionType.getAudience().get(0)
+ .toASCIIString());
+ }
- if( node.getDeclaredType().equals( ConditionsType.class ))
- {
- //Conditions
- ConditionsType conditions = (ConditionsType) node.getValue();
- assertEquals( XMLTimeUtil.parse( "2010-09-30T19:13:37.911Z" ) , conditions.getNotBefore() );
- assertEquals( XMLTimeUtil.parse( "2010-09-30T21:13:37.911Z" ) , conditions.getNotOnOrAfter() );
-
- //Audience Restriction
- AudienceRestrictionType audienceRestrictionType =
- (AudienceRestrictionType) conditions.getConditionOrAudienceRestrictionOrOneTimeUse();
- assertEquals( 1, audienceRestrictionType.getAudience().size() );
- assertEquals( "http://services.testcorp.org/provider2", audienceRestrictionType.getAudience().get( 0 ));
- }
- }*/
- }
-
-
@Test
public void testAssertionWithX500Attribute() throws Exception
{
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
- InputStream configStream = tcl.getResourceAsStream( "parser/saml2/saml2-assertion-x500attrib.xml" );
+ InputStream configStream = tcl.getResourceAsStream("parser/saml2/saml2-assertion-x500attrib.xml");
SAMLParser parser = new SAMLParser();
AssertionType assertion = (AssertionType) parser.parse(configStream);
- assertNotNull( assertion );
+ assertNotNull(assertion);
- assertEquals( "ID_b07b804c-7c29-ea16-7300-4f3d6f7928ac", assertion.getID() );
- assertEquals( XMLTimeUtil.parse( "2004-12-05T09:22:05Z" ), assertion.getIssueInstant() );
- assertEquals( "2.0", assertion.getVersion() );
+ assertEquals("ID_b07b804c-7c29-ea16-7300-4f3d6f7928ac", assertion.getID());
+ assertEquals(XMLTimeUtil.parse("2004-12-05T09:22:05Z"), assertion.getIssueInstant());
+ assertEquals("2.0", assertion.getVersion());
//Issuer
- assertEquals( "https://idp.example.org/SAML2", assertion.getIssuer().getValue() );
+ assertEquals("https://idp.example.org/SAML2", assertion.getIssuer().getValue());
- Set<StatementAbstractType> statements = assertion.getStatements();
- assertEquals( 2, statements.size() );
+ Set<StatementAbstractType> statements = assertion.getStatements();
+ assertEquals(2, statements.size());
Iterator<StatementAbstractType> iter = statements.iterator();
AuthnStatementType authnStatement = (AuthnStatementType) iter.next();
- assertEquals( XMLTimeUtil.parse( "2004-12-05T09:22:00Z" ), authnStatement.getAuthnInstant() );
- assertEquals( "b07b804c-7c29-ea16-7300-4f3d6f7928ac", authnStatement.getSessionIndex() );
+ assertEquals(XMLTimeUtil.parse("2004-12-05T09:22:00Z"), authnStatement.getAuthnInstant());
+ assertEquals("b07b804c-7c29-ea16-7300-4f3d6f7928ac", authnStatement.getSessionIndex());
-
AttributeStatementType attributeStatement = (AttributeStatementType) iter.next();
List<ASTChoiceType> attributes = attributeStatement.getAttributes();
- assertEquals( 1, attributes.size() );
+ assertEquals(1, attributes.size());
AttributeType attribute = attributes.get(0).getAttribute();
- assertEquals( "eduPersonAffiliation", attribute.getFriendlyName() );
- assertEquals( "urn:oid:1.3.6.1.4.1.5923.1.1.1.1", attribute.getName() );
- assertEquals( "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", attribute.getNameFormat() );
+ assertEquals("eduPersonAffiliation", attribute.getFriendlyName());
+ assertEquals("urn:oid:1.3.6.1.4.1.5923.1.1.1.1", attribute.getName());
+ assertEquals("urn:oasis:names:tc:SAML:2.0:attrname-format:uri", attribute.getNameFormat());
//Ensure that we have x500:encoding
- QName x500EncodingName = new QName( JBossSAMLURIConstants.X500_NSURI.get(),
- JBossSAMLConstants.ENCODING.get() );
- String encodingValue = attribute.getOtherAttributes().get( x500EncodingName );
- assertEquals( "LDAP", encodingValue );
+ QName x500EncodingName = new QName(JBossSAMLURIConstants.X500_NSURI.get(), JBossSAMLConstants.ENCODING.get());
+ String encodingValue = attribute.getOtherAttributes().get(x500EncodingName);
+ assertEquals("LDAP", encodingValue);
List<Object> attributeValues = attribute.getAttributeValue();
- assertEquals( 2, attributeValues.size() );
+ assertEquals(2, attributeValues.size());
- String str = (String ) attributeValues.get( 0 );
- if( ! ( str.equals( "member") || str.equals( "staff" )))
- throw new RuntimeException( "attrib value not found" );
+ String str = (String) attributeValues.get(0);
+ if (!(str.equals("member") || str.equals("staff")))
+ throw new RuntimeException("attrib value not found");
//Subject
SubjectType subject = assertion.getSubject();
STSubType subType = subject.getSubType();
NameIDType subjectNameID = (NameIDType) subType.getBaseID();
- assertEquals( "3f7b3dcf-1674-4ecd-92c8-1544f346baf8", subjectNameID.getValue() );
- assertEquals( "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", subjectNameID.getFormat().toString() );
-
- SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0 );
- assertEquals( "urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod() );
-
+ assertEquals("3f7b3dcf-1674-4ecd-92c8-1544f346baf8", subjectNameID.getValue());
+ assertEquals("urn:oasis:names:tc:SAML:2.0:nameid-format:transient", subjectNameID.getFormat().toString());
+
+ SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0);
+ assertEquals("urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod());
+
SubjectConfirmationDataType subjectConfirmationData = subjectConfirmation.getSubjectConfirmationData();
- assertEquals( "ID_aaf23196-1773-2113-474a-fe114412ab72", subjectConfirmationData.getInResponseTo() );
- assertEquals( XMLTimeUtil.parse( "2004-12-05T09:27:05Z" ), subjectConfirmationData.getNotOnOrAfter() );
- assertEquals( "https://sp.example.com/SAML2/SSO/POST", subjectConfirmationData.getRecipient());
-
+ assertEquals("ID_aaf23196-1773-2113-474a-fe114412ab72", subjectConfirmationData.getInResponseTo());
+ assertEquals(XMLTimeUtil.parse("2004-12-05T09:27:05Z"), subjectConfirmationData.getNotOnOrAfter());
+ assertEquals("https://sp.example.com/SAML2/SSO/POST", subjectConfirmationData.getRecipient());
+
ConditionsType conditions = assertion.getConditions();
- assertEquals( XMLTimeUtil.parse( "2004-12-05T09:17:05Z" ) , conditions.getNotBefore() );
- assertEquals( XMLTimeUtil.parse( "2004-12-05T09:27:05Z" ) , conditions.getNotOnOrAfter() );
-
+ assertEquals(XMLTimeUtil.parse("2004-12-05T09:17:05Z"), conditions.getNotBefore());
+ assertEquals(XMLTimeUtil.parse("2004-12-05T09:27:05Z"), conditions.getNotOnOrAfter());
+
AudienceRestrictionType audienceRestrictionType = (AudienceRestrictionType) conditions.getConditions().get(0);
- assertEquals( 1, audienceRestrictionType.getAudience().size() );
- assertEquals( "https://sp.example.com/SAML2", audienceRestrictionType.getAudience().get( 0 ).toString());
-
-
+ assertEquals(1, audienceRestrictionType.getAudience().size());
+ assertEquals("https://sp.example.com/SAML2", audienceRestrictionType.getAudience().get(0).toString());
+
/*List<JAXBElement<?>> content = subject.getContent();
int size = content.size();
@@ -300,14 +266,14 @@
assertEquals( "https://sp.example.com/SAML2/SSO/POST", subjectConfirmationData.getRecipient());
}
} */
-
+
ByteArrayOutputStream baos = new ByteArrayOutputStream();
SAMLAssertionWriter writer = new SAMLAssertionWriter(StaxUtil.getXMLStreamWriter(baos));
writer.write(assertion);
-
- System.out.println( new String( baos.toByteArray() ));
-
- ByteArrayInputStream bis = new ByteArrayInputStream( baos.toByteArray() );
- DocumentUtil.getDocument( bis ); //throws exceptions
+
+ System.out.println(new String(baos.toByteArray()));
+
+ ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
+ DocumentUtil.getDocument(bis); //throws exceptions
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/saml/v2/util/AssertionUtilUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/saml/v2/util/AssertionUtilUnitTestCase.java 2011-06-23 01:04:12 UTC (rev 1022)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/saml/v2/util/AssertionUtilUnitTestCase.java 2011-06-23 01:05:52 UTC (rev 1023)
@@ -32,7 +32,6 @@
import org.junit.Test;
import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
-import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
@@ -54,8 +53,7 @@
NameIDType nameIdType = new NameIDType();
nameIdType.setValue("somename");
- AssertionType assertion = new AssertionType("SomeID", XMLTimeUtil.getIssueInstant(),
- JBossSAMLConstants.VERSION_2_0.get());
+ AssertionType assertion = new AssertionType("SomeID", XMLTimeUtil.getIssueInstant());
assertion.setIssuer(nameIdType);
//Assertions with no conditions are everlasting
@@ -78,8 +76,7 @@
NameIDType nameIdType = new NameIDType();
nameIdType.setValue("somename");
- AssertionType assertion = new AssertionType("SomeID", XMLTimeUtil.getIssueInstant(),
- JBossSAMLConstants.VERSION_2_0.get());
+ AssertionType assertion = new AssertionType("SomeID", XMLTimeUtil.getIssueInstant());
assertion.setIssuer(nameIdType);
XMLGregorianCalendar now = XMLTimeUtil.getIssueInstant();
Added: federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion.xml
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion.xml (rev 0)
+++ federation/trunk/picketlink-fed-core/src/test/resources/parser/saml1/saml1-assertion.xml 2011-06-23 01:05:52 UTC (rev 1023)
@@ -0,0 +1,25 @@
+<saml:Assertion
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ MajorVersion="1" MinorVersion="1"
+ AssertionID="buGxcG4gILg5NlocyLccDz6iXrUa"
+ Issuer="https://idp.example.org/saml"
+ IssueInstant="2002-06-19T17:05:37.795Z">
+ <saml:Conditions
+ NotBefore="2002-06-19T17:00:37.795Z"
+ NotOnOrAfter="2002-06-19T17:10:37.795Z"/>
+ <saml:AuthenticationStatement
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password"
+ AuthenticationInstant="2002-06-19T17:05:17.706Z">
+ <saml:Subject>
+ <saml:NameIdentifier
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
+ user(a)idp.example.org
+ </saml:NameIdentifier>
+ <saml:SubjectConfirmation>
+ <saml:ConfirmationMethod>
+ urn:oasis:names:tc:SAML:1.0:cm:bearer
+ </saml:ConfirmationMethod>
+ </saml:SubjectConfirmation>
+ </saml:Subject>
+ </saml:AuthenticationStatement>
+ </saml:Assertion>
\ No newline at end of file
13 years, 6 months
Picketlink SVN: r1022 - in federation/trunk/picketlink-fed-model/src/main: java/org/picketlink/identity/federation/saml/common and 7 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-22 21:04:12 -0400 (Wed, 22 Jun 2011)
New Revision: 1022
Added:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAdviceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAssertionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonConditionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonRequestAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonStatusDetailType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ActionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AdviceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AssertionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeDesignatorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AudienceRestrictionCondition.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthenticationStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorityBindingType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DecisionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DoNotCacheConditionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11EvidenceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectConfirmationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectLocalityType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AttributeQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthenticationQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthorizationDecisionQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11QueryAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusCodeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11SubjectQueryAbstractType.java
federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/
federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-assertion-1.0.xsd
federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-protocol-1.1.xsd
Modified:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ActionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AdviceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AssertionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ConditionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/OneTimeUseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ProxyRestrictionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResolveType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AssertionIDRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AttributeQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthzDecisionQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/LogoutRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ManageNameIDRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingRequestType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/RequestAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusDetailType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/SubjectQueryAbstractType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLAuthzDecisionQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLPolicyQueryType.java
Log:
PLFED-189: saml 1.1 object model
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonActionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+
+/**
+ * SAML Action Type
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class CommonActionType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected String namespace;
+
+ /**
+ * Gets the value of the namespace property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ /**
+ * Sets the value of the namespace property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNamespace(String value)
+ {
+ this.namespace = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAdviceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAdviceType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAdviceType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * SAML Advice Type
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class CommonAdviceType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<Object> advices = new ArrayList<Object>();
+
+ /**
+ * Add an advice
+ * @param obj
+ */
+ public void addAdvice(Object obj)
+ {
+ advices.add(obj);
+ }
+
+ /**
+ * Remove an advice
+ * @param advice
+ * @return
+ */
+ public boolean remove(Object advice)
+ {
+ return this.advices.remove(advice);
+ }
+
+ /**
+ * Gets the advices. (Read only list)
+ * @return {@link List} read only
+ */
+ public List<Object> getAdvices()
+ {
+ return Collections.unmodifiableList(advices);
+ }
+}
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAssertionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAssertionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonAssertionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * SAML AssertionType
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 21, 2011
+ */
+public class CommonAssertionType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected XMLGregorianCalendar issueInstant;
+
+ protected String ID;
+
+ public CommonAssertionType(String iD, XMLGregorianCalendar issueInstant)
+ {
+ if (iD == null)
+ throw new IllegalArgumentException("iD is null");
+ if (issueInstant == null)
+ throw new IllegalArgumentException("issueInstant is null");
+
+ this.issueInstant = issueInstant;
+ ID = iD;
+ }
+
+ public XMLGregorianCalendar getIssueInstant()
+ {
+ return issueInstant;
+ }
+
+ public String getID()
+ {
+ return ID;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonConditionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonConditionsType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonConditionsType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class CommonConditionsType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected XMLGregorianCalendar notBefore;
+
+ protected XMLGregorianCalendar notOnOrAfter;
+
+ /**
+ * Gets the value of the notBefore property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getNotBefore()
+ {
+ return notBefore;
+ }
+
+ /**
+ * Sets the value of the notBefore property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setNotBefore(XMLGregorianCalendar value)
+ {
+ this.notBefore = value;
+ }
+
+ /**
+ * Gets the value of the notOnOrAfter property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getNotOnOrAfter()
+ {
+ return notOnOrAfter;
+ }
+
+ /**
+ * Sets the value of the notOnOrAfter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setNotOnOrAfter(XMLGregorianCalendar value)
+ {
+ this.notOnOrAfter = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonRequestAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonRequestAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonRequestAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.picketlink.identity.xmlsec.w3.xmldsig.SignatureType;
+import org.w3c.dom.Element;
+
+/**
+ * SAML Request Abstract Type
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class CommonRequestAbstractType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected String id;
+
+ protected XMLGregorianCalendar issueInstant;
+
+ protected Element signature;
+
+ public CommonRequestAbstractType(String id, XMLGregorianCalendar issueInstant)
+ {
+ this.id = id;
+ this.issueInstant = issueInstant;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getID()
+ {
+ return id;
+ }
+
+ /**
+ * Gets the value of the issueInstant property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getIssueInstant()
+ {
+ return issueInstant;
+ }
+
+ /**
+ * Gets the value of the signature property.
+ *
+ * @return
+ * possible object is
+ * {@link SignatureType }
+ *
+ */
+ public Element getSignature()
+ {
+ return signature;
+ }
+
+ /**
+ * Sets the value of the signature property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SignatureType }
+ *
+ */
+ public void setSignature(Element value)
+ {
+ this.signature = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonResponseType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.picketlink.identity.xmlsec.w3.xmldsig.SignatureType;
+import org.w3c.dom.Element;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class CommonResponseType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected String id;
+
+ protected XMLGregorianCalendar issueInstant;
+
+ protected String inResponseTo;
+
+ protected Element signature;
+
+ public CommonResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ this.id = id;
+ this.issueInstant = issueInstant;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getID()
+ {
+ return id;
+ }
+
+ /**
+ * Gets the value of the issueInstant property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getIssueInstant()
+ {
+ return issueInstant;
+ }
+
+ /**
+ * Gets the value of the inResponseTo property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInResponseTo()
+ {
+ return inResponseTo;
+ }
+
+ /**
+ * Sets the value of the inResponseTo property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInResponseTo(String value)
+ {
+ this.inResponseTo = value;
+ }
+
+ /**
+ * Gets the value of the signature property.
+ *
+ * @return
+ * possible object is
+ * {@link SignatureType }
+ *
+ */
+ public Element getSignature()
+ {
+ return signature;
+ }
+
+ /**
+ * Sets the value of the signature property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SignatureType }
+ *
+ */
+ public void setSignature(Element value)
+ {
+ this.signature = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonStatusDetailType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonStatusDetailType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonStatusDetailType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.common;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <p>Java class for StatusDetailType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="StatusDetailType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class CommonStatusDetailType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<Object> any = new ArrayList<Object>();
+
+ /**
+ * Add status detail
+ * @param obj
+ */
+ public void addStatusDetail(Object obj)
+ {
+ this.any.add(obj);
+ }
+
+ /**
+ * Remove status detail
+ * @param obj
+ */
+ public void removeStatusDetail(Object obj)
+ {
+ this.any.remove(obj);
+ }
+
+ /**
+ * Gets the value of the any property. Read-Only list
+ */
+ public List<Object> getAny()
+ {
+ return Collections.unmodifiableList(this.any);
+ }
+}
\ No newline at end of file
Property changes on: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/common/CommonStatusDetailType.java
___________________________________________________________________
Added: svn:executable
+ *
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ActionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ActionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ActionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import org.picketlink.identity.federation.saml.common.CommonActionType;
+
+/**
+ * SAML11 Action Type
+ *
+ * <complexType name="ActionType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="Namespace" type="anyURI"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11ActionType extends CommonActionType
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AdviceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AdviceType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AdviceType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import org.picketlink.identity.federation.saml.common.CommonAdviceType;
+
+/**
+ * <complexType name="AdviceType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AdviceType extends CommonAdviceType
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AssertionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AssertionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AssertionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.picketlink.identity.federation.saml.common.CommonAssertionType;
+import org.w3c.dom.Element;
+
+/**
+ * <complexType name="AssertionType">
+ <sequence>
+ <element ref="saml:Conditions" minOccurs="0"/>
+ <element ref="saml:Advice" minOccurs="0"/>
+ <choice maxOccurs="unbounded">
+ <element ref="saml:Statement"/>
+ <element ref="saml:SubjectStatement"/>
+ <element ref="saml:AuthenticationStatement"/>
+ <element ref="saml:AuthorizationDecisionStatement"/>
+ <element ref="saml:AttributeStatement"/>
+ </choice>
+
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="AssertionID" type="ID" use="required"/>
+ <attribute name="Issuer" type="string" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 21, 2011
+ */
+public class SAML11AssertionType extends CommonAssertionType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected int majorVersion = 1;
+
+ protected int minorVersion = 1;
+
+ protected SAML11ConditionsType conditions;
+
+ protected SAML11AdviceType advice;
+
+ protected List<SAML11StatementAbstractType> statements = new ArrayList<SAML11StatementAbstractType>();
+
+ protected Element signature;
+
+ protected String issuer;
+
+ public SAML11AssertionType(String iD, XMLGregorianCalendar issueInstant)
+ {
+ super(iD, issueInstant);
+ }
+
+ public int getMajorVersion()
+ {
+ return majorVersion;
+ }
+
+ public int getMinorVersion()
+ {
+ return minorVersion;
+ }
+
+ public void add(SAML11StatementAbstractType statement)
+ {
+ this.statements.add(statement);
+ }
+
+ public void addAllStatements(List<SAML11StatementAbstractType> statement)
+ {
+ this.statements.addAll(statement);
+ }
+
+ public boolean remove(SAML11StatementAbstractType statement)
+ {
+ return this.statements.remove(statement);
+ }
+
+ public List<SAML11StatementAbstractType> getStatements()
+ {
+ return Collections.unmodifiableList(statements);
+ }
+
+ public SAML11ConditionsType getConditions()
+ {
+ return conditions;
+ }
+
+ public void setConditions(SAML11ConditionsType conditions)
+ {
+ this.conditions = conditions;
+ }
+
+ public SAML11AdviceType getAdvice()
+ {
+ return advice;
+ }
+
+ public void setAdvice(SAML11AdviceType advice)
+ {
+ this.advice = advice;
+ }
+
+ public Element getSignature()
+ {
+ return signature;
+ }
+
+ public void setSignature(Element signature)
+ {
+ this.signature = signature;
+ }
+
+ public String getIssuer()
+ {
+ return issuer;
+ }
+
+ public void setIssuer(String issuer)
+ {
+ this.issuer = issuer;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeDesignatorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeDesignatorType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeDesignatorType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+
+/**
+ <complexType name="AttributeDesignatorType">
+ <attribute name="AttributeName" type="string" use="required"/>
+ <attribute name="AttributeNamespace" type="anyURI" use="required"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AttributeDesignatorType
+{
+ protected String attributeName;
+
+ protected URI attributeNamespace;
+
+ public SAML11AttributeDesignatorType(String attributeName, URI attributeNamespace)
+ {
+ this.attributeName = attributeName;
+ this.attributeNamespace = attributeNamespace;
+ }
+
+ public String getAttributeName()
+ {
+ return attributeName;
+ }
+
+ public URI getAttributeNamespace()
+ {
+ return attributeNamespace;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeStatementType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <complexType name="AttributeStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Attribute" maxOccurs="unbounded"/>
+
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AttributeStatementType extends SAML11SubjectStatementType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<SAML11AttributeType> attribute = new ArrayList<SAML11AttributeType>();
+
+ public void add(SAML11AttributeType statement)
+ {
+ this.attribute.add(statement);
+ }
+
+ public void addAllStatements(List<SAML11AttributeType> statement)
+ {
+ this.attribute.addAll(statement);
+ }
+
+ public boolean remove(SAML11AttributeType statement)
+ {
+ return this.attribute.remove(statement);
+ }
+
+ public List<SAML11AttributeType> get()
+ {
+ return Collections.unmodifiableList(attribute);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AttributeType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <complexType name="AttributeType">
+ <complexContent>
+ <extension base="saml:AttributeDesignatorType">
+ <sequence>
+ <element ref="saml:AttributeValue" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+
+ </complexType>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AttributeType extends SAML11AttributeDesignatorType
+{
+ protected List<Object> attributeValues = new ArrayList<Object>();
+
+ public SAML11AttributeType(String attributeName, URI attributeNamespace)
+ {
+ super(attributeName, attributeNamespace);
+ }
+
+ public void add(Object advice)
+ {
+ this.attributeValues.add(advice);
+ }
+
+ public void addAll(List<Object> advice)
+ {
+ this.attributeValues.addAll(advice);
+ }
+
+ public boolean remove(Object advice)
+ {
+ return this.attributeValues.remove(advice);
+ }
+
+ public List<Object> get()
+ {
+ return Collections.unmodifiableList(attributeValues);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AudienceRestrictionCondition.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AudienceRestrictionCondition.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AudienceRestrictionCondition.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <complexType name="AudienceRestrictionConditionType">
+ <complexContent>
+ <extension base="saml:ConditionAbstractType">
+ <sequence>
+ <element ref="saml:Audience" maxOccurs="unbounded"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AudienceRestrictionCondition extends SAML11ConditionAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<URI> audience = new ArrayList<URI>();
+
+ public void add(URI advice)
+ {
+ this.audience.add(advice);
+ }
+
+ public void addAll(List<URI> advice)
+ {
+ this.audience.addAll(advice);
+ }
+
+ public boolean remove(URI advice)
+ {
+ return this.audience.remove(advice);
+ }
+
+ public List<URI> get()
+ {
+ return Collections.unmodifiableList(audience);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthenticationStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthenticationStatementType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthenticationStatementType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * <complexType name="AuthenticationStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+
+ <sequence>
+ <element ref="saml:SubjectLocality" minOccurs="0"/>
+ <element ref="saml:AuthorityBinding" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="AuthenticationMethod" type="anyURI" use="required"/>
+ <attribute name="AuthenticationInstant" type="dateTime" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AuthenticationStatementType extends SAML11SubjectStatementType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected URI authenticationMethod;
+
+ protected XMLGregorianCalendar authenticationInstant;
+
+ protected SAML11SubjectLocalityType subjectLocality;
+
+ protected List<SAML11AuthorityBindingType> authorityBinding = new ArrayList<SAML11AuthorityBindingType>();
+
+ public SAML11AuthenticationStatementType(URI authenticationMethod, XMLGregorianCalendar authenticationInstant)
+ {
+ this.authenticationMethod = authenticationMethod;
+ this.authenticationInstant = authenticationInstant;
+ }
+
+ public URI getAuthenticationMethod()
+ {
+ return authenticationMethod;
+ }
+
+ public XMLGregorianCalendar getAuthenticationInstant()
+ {
+ return authenticationInstant;
+ }
+
+ public SAML11SubjectLocalityType getSubjectLocality()
+ {
+ return subjectLocality;
+ }
+
+ public void setSubjectLocality(SAML11SubjectLocalityType subjectLocality)
+ {
+ this.subjectLocality = subjectLocality;
+ }
+
+ public void add(SAML11AuthorityBindingType advice)
+ {
+ this.authorityBinding.add(advice);
+ }
+
+ public void addAllAuthorityBindingType(List<SAML11AuthorityBindingType> advice)
+ {
+ this.authorityBinding.addAll(advice);
+ }
+
+ public boolean remove(SAML11AuthorityBindingType advice)
+ {
+ return this.authorityBinding.remove(advice);
+ }
+
+ public List<SAML11AuthorityBindingType> getAuthorityBindingType()
+ {
+ return Collections.unmodifiableList(authorityBinding);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorityBindingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorityBindingType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorityBindingType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+/**
+ * <complexType name="AuthorityBindingType">
+ <attribute name="AuthorityKind" type="QName" use="required"/>
+ <attribute name="Location" type="anyURI" use="required"/>
+
+ <attribute name="Binding" type="anyURI" use="required"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AuthorityBindingType
+{
+ protected QName authorityKind;
+
+ protected URI location;
+
+ protected URI binding;
+
+ public SAML11AuthorityBindingType(QName authorityKind, URI location, URI binding)
+ {
+ super();
+ this.authorityKind = authorityKind;
+ this.location = location;
+ this.binding = binding;
+ }
+
+ public QName getAuthorityKind()
+ {
+ return authorityKind;
+ }
+
+ public URI getLocation()
+ {
+ return location;
+ }
+
+ public URI getBinding()
+ {
+ return binding;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11AuthorizationDecisionStatementType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <complexType name="AuthorizationDecisionStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ <attribute name="Decision" type="saml:DecisionType" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AuthorizationDecisionStatementType extends SAML11StatementAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<SAML11ActionType> actions = new ArrayList<SAML11ActionType>();
+
+ protected SAML11EvidenceType evidence;
+
+ protected URI resource;
+
+ protected SAML11DecisionType decision;
+
+ public SAML11AuthorizationDecisionStatementType(URI resource, SAML11DecisionType decision)
+ {
+ this.resource = resource;
+ this.decision = decision;
+ }
+
+ public URI getResource()
+ {
+ return resource;
+ }
+
+ public SAML11DecisionType getDecision()
+ {
+ return decision;
+ }
+
+ public void addAction(SAML11ActionType action)
+ {
+ this.actions.add(action);
+ }
+
+ public boolean removeAction(SAML11ActionType action)
+ {
+ return this.actions.remove(action);
+ }
+
+ public List<SAML11ActionType> getActions()
+ {
+ return Collections.unmodifiableList(actions);
+ }
+
+ public SAML11EvidenceType getEvidence()
+ {
+ return evidence;
+ }
+
+ public void setEvidence(SAML11EvidenceType evidence)
+ {
+ this.evidence = evidence;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.io.Serializable;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11ConditionAbstractType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11ConditionType extends SAML11ConditionAbstractType
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.io.Serializable;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11ConditionsAbstractType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+}
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11ConditionsType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.picketlink.identity.federation.saml.common.CommonConditionsType;
+
+/**
+ * <complexType name="ConditionsType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AudienceRestrictionCondition"/>
+ <element ref="saml:DoNotCacheCondition"/>
+ <element ref="saml:Condition"/>
+ </choice>
+ <attribute name="NotBefore" type="dateTime" use="optional"/>
+ <attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
+ </complexType>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11ConditionsType extends CommonConditionsType
+{
+ private static final long serialVersionUID = 1L;
+
+ public List<SAML11ConditionAbstractType> conditions = new ArrayList<SAML11ConditionAbstractType>();
+
+ public void add(SAML11ConditionAbstractType condition)
+ {
+ this.conditions.add(condition);
+ }
+
+ public void addAll(List<SAML11ConditionAbstractType> theConditions)
+ {
+ this.conditions.addAll(theConditions);
+ }
+
+ public boolean remove(SAML11ConditionsAbstractType condition)
+ {
+ return this.conditions.remove(condition);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DecisionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DecisionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DecisionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * <simpleType name="DecisionType">
+ <restriction base="string">
+
+ <enumeration value="Permit"/>
+ <enumeration value="Deny"/>
+ <enumeration value="Indeterminate"/>
+ </restriction>
+ </simpleType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public enum SAML11DecisionType {
+ Permit, Deny, Indeterminate;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DoNotCacheConditionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DoNotCacheConditionType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11DoNotCacheConditionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11DoNotCacheConditionType extends SAML11ConditionAbstractType
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11EvidenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11EvidenceType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11EvidenceType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <complexType name="EvidenceType">
+ <choice maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+
+ <element ref="saml:Assertion"/>
+ </choice>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11EvidenceType
+{
+ protected List<String> assertionIDReference = new ArrayList<String>();
+
+ protected List<SAML11AssertionType> assertions = new ArrayList<SAML11AssertionType>();
+
+ public void add(String condition)
+ {
+ this.assertionIDReference.add(condition);
+ }
+
+ public void addAllAssertionIDReference(List<String> theassertionIDReference)
+ {
+ this.assertionIDReference.addAll(theassertionIDReference);
+ }
+
+ public boolean remove(String assertionIDReference)
+ {
+ return this.assertionIDReference.remove(assertionIDReference);
+ }
+
+ public List<String> getAssertionIDReference()
+ {
+ return Collections.unmodifiableList(assertionIDReference);
+ }
+
+ public void add(SAML11AssertionType condition)
+ {
+ this.assertions.add(condition);
+ }
+
+ public void addAllAssertionType(List<SAML11AssertionType> theassertions)
+ {
+ this.assertions.addAll(theassertions);
+ }
+
+ public boolean remove(SAML11AssertionType assertion)
+ {
+ return this.assertions.remove(assertionIDReference);
+ }
+
+ public List<SAML11AssertionType> getAssertions()
+ {
+ return Collections.unmodifiableList(assertions);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11NameIdentifierType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.io.Serializable;
+import java.net.URI;
+
+/**
+ * <complexType name="NameIdentifierType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="NameQualifier" type="string" use="optional"/>
+ <attribute name="Format" type="anyURI" use="optional"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11NameIdentifierType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected String nameQualifier;
+
+ protected URI format;
+
+ public String getNameQualifier()
+ {
+ return nameQualifier;
+ }
+
+ public void setNameQualifier(String nameQualifier)
+ {
+ this.nameQualifier = nameQualifier;
+ }
+
+ public URI getFormat()
+ {
+ return format;
+ }
+
+ public void setFormat(URI format)
+ {
+ this.format = format;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.io.Serializable;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11StatementAbstractType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11StatementType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11StatementType extends SAML11StatementAbstractType
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectConfirmationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectConfirmationType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectConfirmationType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * <complexType name="SubjectConfirmationType">
+ <sequence>
+ <element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/>
+ <element ref="saml:SubjectConfirmationData" minOccurs="0"/>
+
+ <element ref="ds:KeyInfo" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11SubjectConfirmationType
+{
+ protected List<URI> confirmationMethod = new ArrayList<URI>();
+
+ protected Object subjectConfirmationData;
+
+ protected Element keyInfo;
+
+ public void addConfirmation(URI confirmation)
+ {
+ this.confirmationMethod.add(confirmation);
+ }
+
+ public void addAllConfirmation(List<URI> confirmation)
+ {
+ this.confirmationMethod.addAll(confirmation);
+ }
+
+ public boolean removeConfirmation(URI confirmation)
+ {
+ return this.confirmationMethod.remove(confirmation);
+ }
+
+ public List<URI> getConfirmationMethod()
+ {
+ return Collections.unmodifiableList(confirmationMethod);
+ }
+
+ public void setSubjectConfirmationData(Object subjectConfirmation)
+ {
+ this.subjectConfirmationData = subjectConfirmation;
+ }
+
+ public Element getKeyInfo()
+ {
+ return keyInfo;
+ }
+
+ public void setKeyInfo(Element keyInfo)
+ {
+ this.keyInfo = keyInfo;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectLocalityType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectLocalityType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectLocalityType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * <complexType name="SubjectLocalityType">
+ <attribute name="IPAddress" type="string" use="optional"/>
+ <attribute name="DNSAddress" type="string" use="optional"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11SubjectLocalityType
+{
+ protected String ipAddress;
+
+ protected String dnsAddress;
+
+ public String getIpAddress()
+ {
+ return ipAddress;
+ }
+
+ public void setIpAddress(String ipAddress)
+ {
+ this.ipAddress = ipAddress;
+ }
+
+ public String getDnsAddress()
+ {
+ return dnsAddress;
+ }
+
+ public void setDnsAddress(String dnsAddress)
+ {
+ this.dnsAddress = dnsAddress;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectStatementType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * <complexType name="SubjectStatementAbstractType" abstract="true">
+ <complexContent>
+ <extension base="saml:StatementAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11SubjectStatementType extends SAML11StatementAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SAML11SubjectType subject;
+
+ public SAML11SubjectType getSubject()
+ {
+ return subject;
+ }
+
+ public void setSubject(SAML11SubjectType subject)
+ {
+ this.subject = subject;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/assertion/SAML11SubjectType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.assertion;
+
+/**
+ * <complexType name="SubjectType">
+ <choice>
+ <sequence>
+ <element ref="saml:NameIdentifier"/>
+ <element ref="saml:SubjectConfirmation" minOccurs="0"/>
+
+ </sequence>
+ <element ref="saml:SubjectConfirmation"/>
+ </choice>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11SubjectType
+{
+ public static class SAML11SubjectTypeChoice
+ {
+ protected SAML11NameIdentifierType nameID;
+
+ protected SAML11SubjectConfirmationType subjectConfirmation;
+
+ public SAML11SubjectTypeChoice(SAML11NameIdentifierType nameID)
+ {
+ this.nameID = nameID;
+ }
+
+ public SAML11SubjectTypeChoice(SAML11SubjectConfirmationType subConfirms)
+ {
+ this.subjectConfirmation = subConfirms;
+ }
+
+ public SAML11NameIdentifierType getNameID()
+ {
+ return nameID;
+ }
+
+ public SAML11SubjectConfirmationType getsubjectConfirmation()
+ {
+ return subjectConfirmation;
+ }
+ }
+
+ protected SAML11SubjectConfirmationType subjectConfirmation;
+
+ protected SAML11SubjectTypeChoice choice;
+
+ public SAML11SubjectConfirmationType getSubjectConfirmation()
+ {
+ return subjectConfirmation;
+ }
+
+ public void setSubjectConfirmation(SAML11SubjectConfirmationType subjectConfirmation)
+ {
+ this.subjectConfirmation = subjectConfirmation;
+ }
+
+ public SAML11SubjectTypeChoice getChoice()
+ {
+ return choice;
+ }
+
+ public void setChoice(SAML11SubjectTypeChoice choice)
+ {
+ this.choice = choice;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AttributeQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AttributeQueryType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AttributeQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AttributeDesignatorType;
+
+/**
+ * <complexType name="AttributeQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:AttributeDesignator" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+
+ <attribute name="Resource" type="anyURI" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AttributeQueryType extends SAML11SubjectQueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<SAML11AttributeDesignatorType> attributeDesignator = new ArrayList<SAML11AttributeDesignatorType>();
+
+ protected URI resource;
+
+ public URI getResource()
+ {
+ return resource;
+ }
+
+ public void setResource(URI resource)
+ {
+ this.resource = resource;
+ }
+
+ public void add(SAML11AttributeDesignatorType sadt)
+ {
+ this.attributeDesignator.add(sadt);
+ }
+
+ public boolean remove(SAML11AttributeDesignatorType sadt)
+ {
+ return this.attributeDesignator.remove(sadt);
+ }
+
+ public List<SAML11AttributeDesignatorType> get()
+ {
+ return Collections.unmodifiableList(attributeDesignator);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthenticationQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthenticationQueryType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthenticationQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.net.URI;
+
+/**
+ * <complexType name="AuthenticationQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <attribute name="AuthenticationMethod" type="anyURI"/>
+ </extension>
+
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AuthenticationQueryType extends SAML11SubjectQueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected URI authenticationMethod;
+
+ public URI getAuthenticationMethod()
+ {
+ return authenticationMethod;
+ }
+
+ public void setAuthenticationMethod(URI authenticationMethod)
+ {
+ this.authenticationMethod = authenticationMethod;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthorizationDecisionQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthorizationDecisionQueryType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11AuthorizationDecisionQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11ActionType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11EvidenceType;
+
+/**
+ * <complexType name="AuthorizationDecisionQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11AuthorizationDecisionQueryType extends SAML11SubjectQueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<SAML11ActionType> action = new ArrayList<SAML11ActionType>();
+
+ protected SAML11EvidenceType evidence;
+
+ protected URI resource;
+
+ public URI getResource()
+ {
+ return resource;
+ }
+
+ public void setResource(URI resource)
+ {
+ this.resource = resource;
+ }
+
+ public SAML11EvidenceType getEvidence()
+ {
+ return evidence;
+ }
+
+ public void setEvidence(SAML11EvidenceType evidence)
+ {
+ this.evidence = evidence;
+ }
+
+ public void add(SAML11ActionType sadt)
+ {
+ this.action.add(sadt);
+ }
+
+ public boolean remove(SAML11ActionType sadt)
+ {
+ return this.action.remove(sadt);
+ }
+
+ public List<SAML11ActionType> get()
+ {
+ return Collections.unmodifiableList(action);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11QueryAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11QueryAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11QueryAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.io.Serializable;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11QueryAbstractType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+
+import org.picketlink.identity.federation.saml.common.CommonRequestAbstractType;
+
+/**
+ * <complexType name="RequestAbstractType" abstract="true">
+
+ <sequence>
+ <element ref="samlp:RespondWith" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="RequestID" type="ID" use="required"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11RequestAbstractType extends CommonRequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected int majorVersion = 1;
+
+ protected int minorVersion = 1;
+
+ protected List<QName> respondWith = new ArrayList<QName>();
+
+ public SAML11RequestAbstractType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public int getMajorVersion()
+ {
+ return majorVersion;
+ }
+
+ public int getMinorVersion()
+ {
+ return minorVersion;
+ }
+
+ public void add(QName rw)
+ {
+ this.respondWith.add(rw);
+ }
+
+ public void addAllConditions(List<QName> rw)
+ {
+ this.respondWith.addAll(rw);
+ }
+
+ public boolean remove(QName rw)
+ {
+ return this.respondWith.remove(rw);
+ }
+
+ public List<QName> getRespondWith()
+ {
+ return Collections.unmodifiableList(respondWith);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11RequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * <complexType name="RequestType">
+ <complexContent>
+ <extension base="samlp:RequestAbstractType">
+ <choice>
+ <element ref="samlp:Query"/>
+ <element ref="samlp:SubjectQuery"/>
+ <element ref="samlp:AuthenticationQuery"/>
+
+ <element ref="samlp:AttributeQuery"/>
+ <element ref="samlp:AuthorizationDecisionQuery"/>
+ <element ref="saml:AssertionIDReference" maxOccurs="unbounded"/>
+ <element ref="samlp:AssertionArtifact" maxOccurs="unbounded"/>
+ </choice>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11RequestType extends SAML11RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SAML11QueryAbstractType query;
+
+ protected List<String> assertionIDRef = new ArrayList<String>();
+
+ protected List<String> assertionArtifact = new ArrayList<String>();
+
+ public SAML11RequestType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public void addAssertionIDRef(String sadt)
+ {
+ this.assertionIDRef.add(sadt);
+ }
+
+ public boolean removeAssertionIDRef(String sadt)
+ {
+ return this.assertionIDRef.remove(sadt);
+ }
+
+ public List<String> getAssertionIDRef()
+ {
+ return Collections.unmodifiableList(assertionIDRef);
+ }
+
+ public void addAssertionArtifact(String sadt)
+ {
+ this.assertionArtifact.add(sadt);
+ }
+
+ public boolean removeAssertionArtifact(String sadt)
+ {
+ return this.assertionArtifact.remove(sadt);
+ }
+
+ public List<String> getAssertionArtifact()
+ {
+ return Collections.unmodifiableList(assertionArtifact);
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.net.URI;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.picketlink.identity.federation.saml.common.CommonResponseType;
+
+/**
+ * <complexType name="ResponseAbstractType" abstract="true">
+ <sequence>
+
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="ResponseID" type="ID" use="required"/>
+ <attribute name="InResponseTo" type="NCName" use="optional"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ <attribute name="Recipient" type="anyURI" use="optional"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public abstract class SAML11ResponseAbstractType extends CommonResponseType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected int majorVersion = 1;
+
+ protected int minorVersion = 1;
+
+ protected URI recipient;
+
+ public SAML11ResponseAbstractType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public int getMajorVersion()
+ {
+ return majorVersion;
+ }
+
+ public int getMinorVersion()
+ {
+ return minorVersion;
+ }
+
+ public URI getRecipient()
+ {
+ return recipient;
+ }
+
+ public void setRecipient(URI recipient)
+ {
+ this.recipient = recipient;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11ResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.picketlink.identity.federation.saml.common.CommonResponseType;
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11AssertionType;
+
+/**
+ * <complexType name="ResponseType">
+ <complexContent>
+ <extension base="samlp:ResponseAbstractType">
+ <sequence>
+ <element ref="samlp:Status"/>
+ <element ref="saml:Assertion" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11ResponseType extends CommonResponseType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<SAML11AssertionType> assertions = new ArrayList<SAML11AssertionType>();
+
+ protected SAML11StatusType status;
+
+ public SAML11ResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public void add(SAML11AssertionType assertion)
+ {
+ this.assertions.add(assertion);
+ }
+
+ public boolean remove(SAML11AssertionType assertion)
+ {
+ return this.assertions.remove(assertion);
+ }
+
+ public List<SAML11AssertionType> get()
+ {
+ return Collections.unmodifiableList(assertions);
+ }
+
+ public SAML11StatusType getStatus()
+ {
+ return status;
+ }
+
+ public void setStatus(SAML11StatusType status)
+ {
+ this.status = status;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusCodeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusCodeType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusCodeType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * <complexType name="StatusCodeType">
+ <sequence>
+ <element ref="samlp:StatusCode" minOccurs="0"/>
+ </sequence>
+ <attribute name="Value" type="QName" use="required"/>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11StatusCodeType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SAML11StatusCodeType statusCode;
+
+ protected QName value;
+
+ /**
+ * Gets the value of the statusCode property.
+ *
+ * @return
+ * possible object is
+ * {@link StatusCodeType }
+ *
+ */
+ public SAML11StatusCodeType getStatusCode()
+ {
+ return statusCode;
+ }
+
+ /**
+ * Sets the value of the statusCode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StatusCodeType }
+ *
+ */
+ public void setStatusCode(SAML11StatusCodeType value)
+ {
+ this.statusCode = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public QName getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(QName value)
+ {
+ this.value = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11StatusType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import java.io.Serializable;
+
+import org.picketlink.identity.federation.saml.common.CommonStatusDetailType;
+
+/**
+ * <complexType name="StatusType">
+ <sequence>
+ <element ref="samlp:StatusCode"/>
+ <element ref="samlp:StatusMessage" minOccurs="0"/>
+ <element ref="samlp:StatusDetail" minOccurs="0"/>
+ </sequence>
+
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11StatusType implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SAML11StatusCodeType statusCode;
+
+ protected String statusMessage;
+
+ protected CommonStatusDetailType statusDetail;
+
+ public SAML11StatusCodeType getStatusCode()
+ {
+ return statusCode;
+ }
+
+ public void setStatusCode(SAML11StatusCodeType statusCode)
+ {
+ this.statusCode = statusCode;
+ }
+
+ public String getStatusMessage()
+ {
+ return statusMessage;
+ }
+
+ public void setStatusMessage(String statusMessage)
+ {
+ this.statusMessage = statusMessage;
+ }
+
+ public CommonStatusDetailType getStatusDetail()
+ {
+ return statusDetail;
+ }
+
+ public void setStatusDetail(CommonStatusDetailType statusDetail)
+ {
+ this.statusDetail = statusDetail;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11SubjectQueryAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11SubjectQueryAbstractType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v1/protocol/SAML11SubjectQueryAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v1.protocol;
+
+import org.picketlink.identity.federation.saml.v1.assertion.SAML11SubjectType;
+
+/**
+ * <complexType name="SubjectQueryAbstractType" abstract="true">
+ <complexContent>
+ <extension base="samlp:QueryAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 22, 2011
+ */
+public class SAML11SubjectQueryAbstractType extends SAML11QueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SAML11SubjectType subject;
+
+ public SAML11SubjectType getSubject()
+ {
+ return subject;
+ }
+
+ public void setSubject(SAML11SubjectType subject)
+ {
+ this.subject = subject;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ActionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ActionType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ActionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -21,9 +21,8 @@
*/
package org.picketlink.identity.federation.saml.v2.assertion;
-import java.io.Serializable;
+import org.picketlink.identity.federation.saml.common.CommonActionType;
-
/**
* <p>Java class for ActionType complex type.
*
@@ -40,59 +39,8 @@
* </pre>
*
*
- */
-public class ActionType implements Serializable {
-
+ */
+public class ActionType extends CommonActionType
+{
private static final long serialVersionUID = 1L;
-
- protected String value;
- protected String namespace;
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the namespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * Sets the value of the namespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setNamespace(String value) {
- this.namespace = value;
- }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AdviceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AdviceType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AdviceType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -22,12 +22,8 @@
package org.picketlink.identity.federation.saml.v2.assertion;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import org.picketlink.identity.federation.saml.common.CommonAdviceType;
-
/**
* <p>Java class for AdviceType complex type.
*
@@ -50,27 +46,8 @@
* </pre>
*
*
- */
-public class AdviceType implements Serializable
-{
+ */
+public class AdviceType extends CommonAdviceType
+{
private static final long serialVersionUID = 1L;
- protected List<Object> advices = new ArrayList<Object>();
-
- /**
- * Add an advice
- * @param obj
- */
- public void addAdvice( Object obj )
- {
- advices.add( obj );
- }
-
- /**
- * Gets the advices. (Read only list)
- * @return {@link List} read only
- */
- public List<Object> getAdvices()
- {
- return Collections.unmodifiableList( advices );
- }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AssertionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AssertionType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/AssertionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -21,14 +21,14 @@
*/
package org.picketlink.identity.federation.saml.v2.assertion;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.xml.datatype.XMLGregorianCalendar;
-
+
+import org.picketlink.identity.federation.saml.common.CommonAssertionType;
import org.w3c.dom.Element;
/**
@@ -53,27 +53,23 @@
* @author Anil.Saldhana(a)redhat.com
* @since Nov 24, 2010
*/
-public class AssertionType implements Serializable
-{
+public class AssertionType extends CommonAssertionType
+{
private static final long serialVersionUID = 1L;
- private String ID;
-
private Element signature;
- private XMLGregorianCalendar issueInstant;
+ private final String version = "2.0";
- private String version;
-
private AdviceType advice;
private NameIDType issuer;
-
+
private SubjectType subject;
private ConditionsType conditions;
- private Set<StatementAbstractType> statements = new LinkedHashSet<StatementAbstractType>();
+ private final Set<StatementAbstractType> statements = new LinkedHashSet<StatementAbstractType>();
/**
* Create an assertion
@@ -81,27 +77,9 @@
* @param issueInstant {@link XMLGregorianCalendar} issue instant (required)
* @param version
*/
- public AssertionType(String iD, XMLGregorianCalendar issueInstant, String version)
- {
- if( iD == null )
- throw new IllegalArgumentException( "iD is null" );
- if( issueInstant == null )
- throw new IllegalArgumentException( "issueInstant is null" );
- if( version == null )
- throw new IllegalArgumentException( "version is null" );
-
- this.ID = iD;
- this.issueInstant = issueInstant;
- this.version = version;
- }
-
- /**
- * Get the assertion id
- * @return {@link String}
- */
- public String getID()
+ public AssertionType(String iD, XMLGregorianCalendar issueInstant)
{
- return ID;
+ super(iD, issueInstant);
}
/**
@@ -125,22 +103,13 @@
}
/**
- * Get the Issue Instant
- * @return {@link XMLGregorianCalendar}
- */
- public XMLGregorianCalendar getIssueInstant()
- {
- return issueInstant;
- }
-
- /**
* Get the version of SAML
* @return {@link String}
*/
public String getVersion()
{
return version;
- }
+ }
/**
* Get the advice
@@ -158,7 +127,7 @@
public void setAdvice(AdviceType advice)
{
checkSTSPermission();
-
+
this.advice = advice;
}
@@ -169,7 +138,7 @@
public ConditionsType getConditions()
{
checkSTSPermission();
-
+
return conditions;
}
@@ -180,7 +149,7 @@
public void setConditions(ConditionsType conditions)
{
checkSTSPermission();
-
+
this.conditions = conditions;
}
@@ -200,42 +169,43 @@
public void setIssuer(NameIDType issuer)
{
checkSTSPermission();
-
+
this.issuer = issuer;
- }
+ }
/**
* Add a statement
* @param statement {@link StatementAbstractType}
*/
- public void addStatement( StatementAbstractType statement )
+ public void addStatement(StatementAbstractType statement)
{
checkSTSPermission();
-
- this.statements.add( statement );
+
+ this.statements.add(statement);
}
+
/**
* Add a collection of statements
* @param statement {@link Collection}
*/
- public void addStatements( Collection<StatementAbstractType> statement )
+ public void addStatements(Collection<StatementAbstractType> statement)
{
checkSTSPermission();
-
- this.statements.addAll( statement );
+
+ this.statements.addAll(statement);
}
/**
* Add a set of statements
* @param statement {@link Collection}
*/
- public void addStatements( Set<StatementAbstractType> statement )
+ public void addStatements(Set<StatementAbstractType> statement)
{
checkSTSPermission();
-
- this.statements.addAll( statement );
+
+ this.statements.addAll(statement);
}
-
+
/**
* Get a read only set of statements
* @return {@link Set}
@@ -243,8 +213,8 @@
public Set<StatementAbstractType> getStatements()
{
checkSTSPermission();
-
- return Collections.unmodifiableSet( statements );
+
+ return Collections.unmodifiableSet(statements);
}
/**
@@ -263,24 +233,23 @@
public void setSignature(Element signature)
{
this.signature = signature;
- }
-
+ }
+
/**
* Update the issue instant
* @param xg
*/
- public void updateIssueInstant( XMLGregorianCalendar xg )
+ public void updateIssueInstant(XMLGregorianCalendar xg)
{
checkSTSPermission();
-
- this.issueInstant = xg;
+
+ this.issueInstant = xg;
}
-
protected void checkSTSPermission()
{
SecurityManager sm = System.getSecurityManager();
- if( sm != null )
- sm.checkPermission( new RuntimePermission( "org.picketlink.sts") );
+ if (sm != null)
+ sm.checkPermission(new RuntimePermission("org.picketlink.sts"));
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ConditionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ConditionsType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ConditionsType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -25,9 +25,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-
-import javax.xml.datatype.XMLGregorianCalendar;
+import org.picketlink.identity.federation.saml.common.CommonConditionsType;
/**
* <p>Java class for ConditionsType complex type.
@@ -52,85 +51,36 @@
* </pre>
*
*
- */
-public class ConditionsType implements Serializable
-{
+ */
+public class ConditionsType extends CommonConditionsType implements Serializable
+{
private static final long serialVersionUID = 1L;
- protected List<ConditionAbstractType> conditions = new ArrayList<ConditionAbstractType>();
- protected XMLGregorianCalendar notBefore;
- protected XMLGregorianCalendar notOnOrAfter;
+ protected List<ConditionAbstractType> conditions = new ArrayList<ConditionAbstractType>();
+
/**
* Add a condition
* @param condition
*/
- public void addCondition( ConditionAbstractType condition )
+ public void addCondition(ConditionAbstractType condition)
{
- this.conditions.add( condition );
+ this.conditions.add(condition);
}
-
+
/**
* Remove a condition
* @param condition
*/
- public void removeCondition( ConditionAbstractType condition )
+ public void removeCondition(ConditionAbstractType condition)
{
- this.conditions.remove( condition );
+ this.conditions.remove(condition);
}
/**
* Gets an read only conditions list.
*/
- public List<ConditionAbstractType> getConditions()
- {
- return Collections.unmodifiableList( this.conditions );
+ public List<ConditionAbstractType> getConditions()
+ {
+ return Collections.unmodifiableList(this.conditions);
}
-
- /**
- * Gets the value of the notBefore property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getNotBefore() {
- return notBefore;
- }
-
- /**
- * Sets the value of the notBefore property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setNotBefore(XMLGregorianCalendar value) {
- this.notBefore = value;
- }
-
- /**
- * Gets the value of the notOnOrAfter property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getNotOnOrAfter() {
- return notOnOrAfter;
- }
-
- /**
- * Sets the value of the notOnOrAfter property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setNotOnOrAfter(XMLGregorianCalendar value) {
- this.notOnOrAfter = value;
- }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/OneTimeUseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/OneTimeUseType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/OneTimeUseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -20,7 +20,6 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.picketlink.identity.federation.saml.v2.assertion;
-
/**
* <p>Java class for OneTimeUseType complex type.
@@ -37,8 +36,8 @@
* </pre>
*
*
- */
-public class OneTimeUseType
- extends ConditionAbstractType
-{
+ */
+public class OneTimeUseType extends ConditionAbstractType
+{
+ private static final long serialVersionUID = 1L;
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ProxyRestrictionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ProxyRestrictionType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/assertion/ProxyRestrictionType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -27,7 +27,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for ProxyRestrictionType complex type.
*
@@ -47,10 +46,11 @@
* </pre>
*
*
- */
-public class ProxyRestrictionType
-extends ConditionAbstractType
-{
+ */
+public class ProxyRestrictionType extends ConditionAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
protected List<URI> audience = new ArrayList<URI>();
protected BigInteger count;
@@ -59,27 +59,27 @@
* Add an audience
* @param a
*/
- public void addAudience( URI a )
+ public void addAudience(URI a)
{
- this.audience.add( a );
+ this.audience.add(a);
}
/**
* Gets the value of the audience property.
*
*/
- public List<URI> getAudience()
- {
- return Collections.unmodifiableList( audience );
+ public List<URI> getAudience()
+ {
+ return Collections.unmodifiableList(audience);
}
-
+
/**
* Remove an audience
* @param a
*/
- public void removeAudience( URI a )
+ public void removeAudience(URI a)
{
- this.audience.remove( a );
+ this.audience.remove(a);
}
/**
@@ -90,7 +90,8 @@
* {@link BigInteger }
*
*/
- public BigInteger getCount() {
+ public BigInteger getCount()
+ {
return count;
}
@@ -102,7 +103,8 @@
* {@link BigInteger }
*
*/
- public void setCount(BigInteger value) {
+ public void setCount(BigInteger value)
+ {
this.count = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResolveType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResolveType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResolveType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -23,8 +23,6 @@
import javax.xml.datatype.XMLGregorianCalendar;
-
-
/**
* <p>Java class for ArtifactResolveType complex type.
*
@@ -43,15 +41,16 @@
* </pre>
*
*
- */
-public class ArtifactResolveType
-extends RequestAbstractType
+ */
+public class ArtifactResolveType extends RequestAbstractType
{
- protected String artifact;
+ private static final long serialVersionUID = 1L;
- public ArtifactResolveType(String id, String version, XMLGregorianCalendar instant)
+ protected String artifact;
+
+ public ArtifactResolveType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -62,7 +61,8 @@
* {@link String }
*
*/
- public String getArtifact() {
+ public String getArtifact()
+ {
return artifact;
}
@@ -74,7 +74,8 @@
* {@link String }
*
*/
- public void setArtifact(String value) {
+ public void setArtifact(String value)
+ {
this.artifact = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResponseType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ArtifactResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -20,11 +20,11 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.picketlink.identity.federation.saml.v2.protocol;
-
+import javax.xml.datatype.XMLGregorianCalendar;
+
import org.w3c.dom.Element;
-
/**
* <p>Java class for ArtifactResponseType complex type.
*
@@ -43,37 +43,44 @@
* </pre>
*
*
- */
-public class ArtifactResponseType
- extends StatusResponseType
+ */
+public class ArtifactResponseType extends StatusResponseType
{
+ private static final long serialVersionUID = 1L;
- protected Object any;
+ protected Object any;
- /**
- * Gets the value of the any property.
- *
- * @return
- * possible object is
- * {@link Element }
- * {@link Object }
- *
- */
- public Object getAny() {
- return any;
- }
+ public ArtifactResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
- /**
- * Sets the value of the any property.
- *
- * @param value
- * allowed object is
- * {@link Element }
- * {@link Object }
- *
- */
- public void setAny(Object value) {
- this.any = value;
- }
+ /**
+ * Gets the value of the any property.
+ *
+ * @return
+ * possible object is
+ * {@link Element }
+ * {@link Object }
+ *
+ */
+ public Object getAny()
+ {
+ return any;
+ }
+ /**
+ * Sets the value of the any property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Element }
+ * {@link Object }
+ *
+ */
+ public void setAny(Object value)
+ {
+ this.any = value;
+ }
+
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AssertionIDRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AssertionIDRequestType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AssertionIDRequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -27,7 +27,6 @@
import javax.xml.datatype.XMLGregorianCalendar;
-
/**
* <p>Java class for AssertionIDRequestType complex type.
*
@@ -46,41 +45,42 @@
* </pre>
*
*
- */
-public class AssertionIDRequestType
-extends RequestAbstractType
-{
+ */
+public class AssertionIDRequestType extends RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
protected List<String> assertionIDRef = new ArrayList<String>();
-
- public AssertionIDRequestType(String id, String version, XMLGregorianCalendar instant)
+
+ public AssertionIDRequestType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
* Add assertion id reference
* @param id
*/
- public void addAssertionIDRef( String id )
+ public void addAssertionIDRef(String id)
{
- assertionIDRef.add( id );
+ assertionIDRef.add(id);
}
-
+
/**
* remove assertion id reference
* @param id
*/
- public void removeAssertionIDRef( String id )
+ public void removeAssertionIDRef(String id)
{
- assertionIDRef.remove( id );
+ assertionIDRef.remove(id);
}
/**
* Gets the value of the assertionIDRef property.
*
*/
- public List<String> getAssertionIDRef()
+ public List<String> getAssertionIDRef()
{
- return Collections.unmodifiableList( this.assertionIDRef );
+ return Collections.unmodifiableList(this.assertionIDRef);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AttributeQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AttributeQueryType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AttributeQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -28,9 +28,7 @@
import javax.xml.datatype.XMLGregorianCalendar;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
-
-
/**
* <p>Java class for AttributeQueryType complex type.
*
@@ -49,40 +47,41 @@
* </pre>
*
*
- */
-public class AttributeQueryType
-extends SubjectQueryAbstractType
+ */
+public class AttributeQueryType extends SubjectQueryAbstractType
{
+ private static final long serialVersionUID = 1L;
+
protected List<AttributeType> attribute = new ArrayList<AttributeType>();
-
- public AttributeQueryType(String id, String version, XMLGregorianCalendar instant)
+
+ public AttributeQueryType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
* Add an attribute
* @param att
*/
- public void add( AttributeType att )
+ public void add(AttributeType att)
{
this.attribute.add(att);
}
-
+
/**
* Remove an attribute
* @param att
*/
- public void remove( AttributeType att )
+ public void remove(AttributeType att)
{
this.attribute.remove(att);
}
-
+
/**
* Gets the value of the attribute property.
*/
- public List<AttributeType> getAttribute()
+ public List<AttributeType> getAttribute()
{
- return Collections.unmodifiableList( this.attribute );
+ return Collections.unmodifiableList(this.attribute);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnQueryType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -23,7 +23,6 @@
import javax.xml.datatype.XMLGregorianCalendar;
-
/**
* <p>Java class for AuthnQueryType complex type.
*
@@ -43,17 +42,18 @@
* </pre>
*
*
- */
-public class AuthnQueryType
-extends SubjectQueryAbstractType
-{
- protected RequestedAuthnContextType requestedAuthnContext;
+ */
+public class AuthnQueryType extends SubjectQueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected RequestedAuthnContextType requestedAuthnContext;
+
protected String sessionIndex;
-
- public AuthnQueryType(String id, String version, XMLGregorianCalendar instant)
+ public AuthnQueryType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -64,7 +64,8 @@
* {@link RequestedAuthnContextType }
*
*/
- public RequestedAuthnContextType getRequestedAuthnContext() {
+ public RequestedAuthnContextType getRequestedAuthnContext()
+ {
return requestedAuthnContext;
}
@@ -76,7 +77,8 @@
* {@link RequestedAuthnContextType }
*
*/
- public void setRequestedAuthnContext(RequestedAuthnContextType value) {
+ public void setRequestedAuthnContext(RequestedAuthnContextType value)
+ {
this.requestedAuthnContext = value;
}
@@ -88,7 +90,8 @@
* {@link String }
*
*/
- public String getSessionIndex() {
+ public String getSessionIndex()
+ {
return sessionIndex;
}
@@ -100,7 +103,8 @@
* {@link String }
*
*/
- public void setSessionIndex(String value) {
+ public void setSessionIndex(String value)
+ {
this.sessionIndex = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnRequestType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthnRequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -28,8 +28,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.ConditionsType;
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
-
-
/**
* <p>Java class for AuthnRequestType complex type.
*
@@ -59,26 +57,38 @@
* </pre>
*
*
- */
-public class AuthnRequestType
-extends RequestAbstractType
+ */
+public class AuthnRequestType extends RequestAbstractType
{
- protected SubjectType subject;
- protected NameIDPolicyType nameIDPolicy;
- protected ConditionsType conditions;
- protected RequestedAuthnContextType requestedAuthnContext;
- protected ScopingType scoping;
- protected Boolean forceAuthn;
- protected Boolean isPassive;
- protected URI protocolBinding;
- protected Integer assertionConsumerServiceIndex;
- protected URI assertionConsumerServiceURL;
- protected Integer attributeConsumingServiceIndex;
+ private static final long serialVersionUID = 1L;
+
+ protected SubjectType subject;
+
+ protected NameIDPolicyType nameIDPolicy;
+
+ protected ConditionsType conditions;
+
+ protected RequestedAuthnContextType requestedAuthnContext;
+
+ protected ScopingType scoping;
+
+ protected Boolean forceAuthn;
+
+ protected Boolean isPassive;
+
+ protected URI protocolBinding;
+
+ protected Integer assertionConsumerServiceIndex;
+
+ protected URI assertionConsumerServiceURL;
+
+ protected Integer attributeConsumingServiceIndex;
+
protected String providerName;
- public AuthnRequestType(String id, String version, XMLGregorianCalendar instant)
+ public AuthnRequestType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -89,7 +99,8 @@
* {@link SubjectType }
*
*/
- public SubjectType getSubject() {
+ public SubjectType getSubject()
+ {
return subject;
}
@@ -101,7 +112,8 @@
* {@link SubjectType }
*
*/
- public void setSubject(SubjectType value) {
+ public void setSubject(SubjectType value)
+ {
this.subject = value;
}
@@ -113,7 +125,8 @@
* {@link NameIDPolicyType }
*
*/
- public NameIDPolicyType getNameIDPolicy() {
+ public NameIDPolicyType getNameIDPolicy()
+ {
return nameIDPolicy;
}
@@ -125,7 +138,8 @@
* {@link NameIDPolicyType }
*
*/
- public void setNameIDPolicy(NameIDPolicyType value) {
+ public void setNameIDPolicy(NameIDPolicyType value)
+ {
this.nameIDPolicy = value;
}
@@ -137,7 +151,8 @@
* {@link ConditionsType }
*
*/
- public ConditionsType getConditions() {
+ public ConditionsType getConditions()
+ {
return conditions;
}
@@ -149,7 +164,8 @@
* {@link ConditionsType }
*
*/
- public void setConditions(ConditionsType value) {
+ public void setConditions(ConditionsType value)
+ {
this.conditions = value;
}
@@ -161,7 +177,8 @@
* {@link RequestedAuthnContextType }
*
*/
- public RequestedAuthnContextType getRequestedAuthnContext() {
+ public RequestedAuthnContextType getRequestedAuthnContext()
+ {
return requestedAuthnContext;
}
@@ -173,7 +190,8 @@
* {@link RequestedAuthnContextType }
*
*/
- public void setRequestedAuthnContext(RequestedAuthnContextType value) {
+ public void setRequestedAuthnContext(RequestedAuthnContextType value)
+ {
this.requestedAuthnContext = value;
}
@@ -185,7 +203,8 @@
* {@link ScopingType }
*
*/
- public ScopingType getScoping() {
+ public ScopingType getScoping()
+ {
return scoping;
}
@@ -197,7 +216,8 @@
* {@link ScopingType }
*
*/
- public void setScoping(ScopingType value) {
+ public void setScoping(ScopingType value)
+ {
this.scoping = value;
}
@@ -209,7 +229,8 @@
* {@link Boolean }
*
*/
- public Boolean isForceAuthn() {
+ public Boolean isForceAuthn()
+ {
return forceAuthn;
}
@@ -221,7 +242,8 @@
* {@link Boolean }
*
*/
- public void setForceAuthn(Boolean value) {
+ public void setForceAuthn(Boolean value)
+ {
this.forceAuthn = value;
}
@@ -233,7 +255,8 @@
* {@link Boolean }
*
*/
- public Boolean isIsPassive() {
+ public Boolean isIsPassive()
+ {
return isPassive;
}
@@ -245,7 +268,8 @@
* {@link Boolean }
*
*/
- public void setIsPassive(Boolean value) {
+ public void setIsPassive(Boolean value)
+ {
this.isPassive = value;
}
@@ -257,7 +281,8 @@
* {@link String }
*
*/
- public URI getProtocolBinding() {
+ public URI getProtocolBinding()
+ {
return protocolBinding;
}
@@ -269,7 +294,8 @@
* {@link String }
*
*/
- public void setProtocolBinding( URI value) {
+ public void setProtocolBinding(URI value)
+ {
this.protocolBinding = value;
}
@@ -281,7 +307,8 @@
* {@link Integer }
*
*/
- public Integer getAssertionConsumerServiceIndex() {
+ public Integer getAssertionConsumerServiceIndex()
+ {
return assertionConsumerServiceIndex;
}
@@ -293,7 +320,8 @@
* {@link Integer }
*
*/
- public void setAssertionConsumerServiceIndex(Integer value) {
+ public void setAssertionConsumerServiceIndex(Integer value)
+ {
this.assertionConsumerServiceIndex = value;
}
@@ -305,7 +333,8 @@
* {@link String }
*
*/
- public URI getAssertionConsumerServiceURL() {
+ public URI getAssertionConsumerServiceURL()
+ {
return assertionConsumerServiceURL;
}
@@ -317,7 +346,8 @@
* {@link String }
*
*/
- public void setAssertionConsumerServiceURL( URI value) {
+ public void setAssertionConsumerServiceURL(URI value)
+ {
this.assertionConsumerServiceURL = value;
}
@@ -329,7 +359,8 @@
* {@link Integer }
*
*/
- public Integer getAttributeConsumingServiceIndex() {
+ public Integer getAttributeConsumingServiceIndex()
+ {
return attributeConsumingServiceIndex;
}
@@ -341,7 +372,8 @@
* {@link Integer }
*
*/
- public void setAttributeConsumingServiceIndex(Integer value) {
+ public void setAttributeConsumingServiceIndex(Integer value)
+ {
this.attributeConsumingServiceIndex = value;
}
@@ -353,7 +385,8 @@
* {@link String }
*
*/
- public String getProviderName() {
+ public String getProviderName()
+ {
return providerName;
}
@@ -365,7 +398,8 @@
* {@link String }
*
*/
- public void setProviderName(String value) {
+ public void setProviderName(String value)
+ {
this.providerName = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthzDecisionQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthzDecisionQueryType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/AuthzDecisionQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -24,14 +24,13 @@
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
+import java.util.List;
import javax.xml.datatype.XMLGregorianCalendar;
import org.picketlink.identity.federation.saml.v2.assertion.ActionType;
import org.picketlink.identity.federation.saml.v2.assertion.EvidenceType;
-
/**
* <p>Java class for AuthzDecisionQueryType complex type.
*
@@ -50,33 +49,36 @@
* </complexContent>
* </complexType>
* </pre>
- */
-public class AuthzDecisionQueryType
-extends SubjectQueryAbstractType
-{
- protected List<ActionType> action = new ArrayList<ActionType> ();
- protected EvidenceType evidence;
+ */
+public class AuthzDecisionQueryType extends SubjectQueryAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected List<ActionType> action = new ArrayList<ActionType>();
+
+ protected EvidenceType evidence;
+
protected URI resource;
-
- public AuthzDecisionQueryType(String id, String version, XMLGregorianCalendar instant)
+
+ public AuthzDecisionQueryType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
* Add an action
* @param act
*/
- public void addAction( ActionType act )
+ public void addAction(ActionType act)
{
this.action.add(act);
}
-
+
/**
* Remove an action
* @param act
*/
- public void removeAction( ActionType act )
+ public void removeAction(ActionType act)
{
this.action.remove(act);
}
@@ -84,9 +86,9 @@
/**
* Gets the value of the action property.
*/
- public List<ActionType> getAction()
- {
- return Collections.unmodifiableList( this.action );
+ public List<ActionType> getAction()
+ {
+ return Collections.unmodifiableList(this.action);
}
/**
@@ -97,7 +99,7 @@
* {@link EvidenceType }
*
*/
- public EvidenceType getEvidence()
+ public EvidenceType getEvidence()
{
return evidence;
}
@@ -110,7 +112,7 @@
* {@link EvidenceType }
*
*/
- public void setEvidence(EvidenceType value)
+ public void setEvidence(EvidenceType value)
{
this.evidence = value;
}
@@ -123,7 +125,7 @@
* {@link String }
*
*/
- public URI getResource()
+ public URI getResource()
{
return resource;
}
@@ -136,8 +138,8 @@
* {@link String }
*
*/
- public void setResource( URI value)
+ public void setResource(URI value)
{
this.resource = value;
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/LogoutRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/LogoutRequestType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/LogoutRequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -23,15 +23,14 @@
import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
+import java.util.List;
+
import javax.xml.datatype.XMLGregorianCalendar;
import org.picketlink.identity.federation.saml.v2.assertion.BaseIDAbstractType;
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
-
-
/**
* <p>Java class for LogoutRequestType complex type.
*
@@ -57,21 +56,26 @@
* </pre>
*
*
- */
-public class LogoutRequestType
- extends RequestAbstractType
-{
- protected BaseIDAbstractType baseID;
- protected NameIDType nameID;
- protected EncryptedElementType encryptedID;
- protected List<String> sessionIndex = new ArrayList<String>();
- protected String reason;
- protected XMLGregorianCalendar notOnOrAfter;
+ */
+public class LogoutRequestType extends RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
-
- public LogoutRequestType(String id, String version, XMLGregorianCalendar instant)
+ protected BaseIDAbstractType baseID;
+
+ protected NameIDType nameID;
+
+ protected EncryptedElementType encryptedID;
+
+ protected List<String> sessionIndex = new ArrayList<String>();
+
+ protected String reason;
+
+ protected XMLGregorianCalendar notOnOrAfter;
+
+ public LogoutRequestType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -82,143 +86,153 @@
* {@link BaseIDAbstractType }
*
*/
- public BaseIDAbstractType getBaseID() {
- return baseID;
- }
+ public BaseIDAbstractType getBaseID()
+ {
+ return baseID;
+ }
- /**
- * Sets the value of the baseID property.
- *
- * @param value
- * allowed object is
- * {@link BaseIDAbstractType }
- *
- */
- public void setBaseID(BaseIDAbstractType value) {
- this.baseID = value;
- }
+ /**
+ * Sets the value of the baseID property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BaseIDAbstractType }
+ *
+ */
+ public void setBaseID(BaseIDAbstractType value)
+ {
+ this.baseID = value;
+ }
- /**
- * Gets the value of the nameID property.
- *
- * @return
- * possible object is
- * {@link NameIDType }
- *
- */
- public NameIDType getNameID() {
- return nameID;
- }
+ /**
+ * Gets the value of the nameID property.
+ *
+ * @return
+ * possible object is
+ * {@link NameIDType }
+ *
+ */
+ public NameIDType getNameID()
+ {
+ return nameID;
+ }
- /**
- * Sets the value of the nameID property.
- *
- * @param value
- * allowed object is
- * {@link NameIDType }
- *
- */
- public void setNameID(NameIDType value) {
- this.nameID = value;
- }
+ /**
+ * Sets the value of the nameID property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NameIDType }
+ *
+ */
+ public void setNameID(NameIDType value)
+ {
+ this.nameID = value;
+ }
- /**
- * Gets the value of the encryptedID property.
- *
- * @return
- * possible object is
- * {@link EncryptedElementType }
- *
- */
- public EncryptedElementType getEncryptedID() {
- return encryptedID;
- }
+ /**
+ * Gets the value of the encryptedID property.
+ *
+ * @return
+ * possible object is
+ * {@link EncryptedElementType }
+ *
+ */
+ public EncryptedElementType getEncryptedID()
+ {
+ return encryptedID;
+ }
- /**
- * Sets the value of the encryptedID property.
- *
- * @param value
- * allowed object is
- * {@link EncryptedElementType }
- *
- */
- public void setEncryptedID(EncryptedElementType value) {
- this.encryptedID = value;
- }
-
- /**
- * Add session index
- * @param index
- */
- public void addSessionIndex( String index )
- {
- this.sessionIndex.add( index );
- }
-
- /**
- * Remove session index
- * @param index
- */
- public void removeSessionIndex( String index )
- {
- this.sessionIndex.remove( index );
- }
+ /**
+ * Sets the value of the encryptedID property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EncryptedElementType }
+ *
+ */
+ public void setEncryptedID(EncryptedElementType value)
+ {
+ this.encryptedID = value;
+ }
- /**
- * Gets the value of the sessionIndex property.
- *
- */
- public List<String> getSessionIndex()
- {
- return Collections.unmodifiableList( this.sessionIndex );
- }
+ /**
+ * Add session index
+ * @param index
+ */
+ public void addSessionIndex(String index)
+ {
+ this.sessionIndex.add(index);
+ }
- /**
- * Gets the value of the reason property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getReason() {
- return reason;
- }
+ /**
+ * Remove session index
+ * @param index
+ */
+ public void removeSessionIndex(String index)
+ {
+ this.sessionIndex.remove(index);
+ }
- /**
- * Sets the value of the reason property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setReason(String value) {
- this.reason = value;
- }
+ /**
+ * Gets the value of the sessionIndex property.
+ *
+ */
+ public List<String> getSessionIndex()
+ {
+ return Collections.unmodifiableList(this.sessionIndex);
+ }
- /**
- * Gets the value of the notOnOrAfter property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getNotOnOrAfter() {
- return notOnOrAfter;
- }
+ /**
+ * Gets the value of the reason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getReason()
+ {
+ return reason;
+ }
- /**
- * Sets the value of the notOnOrAfter property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setNotOnOrAfter(XMLGregorianCalendar value) {
- this.notOnOrAfter = value;
- }
+ /**
+ * Sets the value of the reason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setReason(String value)
+ {
+ this.reason = value;
+ }
+ /**
+ * Gets the value of the notOnOrAfter property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getNotOnOrAfter()
+ {
+ return notOnOrAfter;
+ }
+
+ /**
+ * Sets the value of the notOnOrAfter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setNotOnOrAfter(XMLGregorianCalendar value)
+ {
+ this.notOnOrAfter = value;
+ }
+
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ManageNameIDRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ManageNameIDRequestType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ManageNameIDRequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -26,8 +26,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
-
-
/**
* <p>Java class for ManageNameIDRequestType complex type.
*
@@ -54,20 +52,24 @@
* </pre>
*
*
- */
-public class ManageNameIDRequestType
-extends RequestAbstractType
-{
- protected NameIDType nameID;
- protected EncryptedElementType encryptedID;
- protected String newID;
- protected EncryptedElementType newEncryptedID;
+ */
+public class ManageNameIDRequestType extends RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected NameIDType nameID;
+
+ protected EncryptedElementType encryptedID;
+
+ protected String newID;
+
+ protected EncryptedElementType newEncryptedID;
+
protected TerminateType terminate;
-
- public ManageNameIDRequestType(String id, String version, XMLGregorianCalendar instant)
+ public ManageNameIDRequestType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -78,7 +80,8 @@
* {@link NameIDType }
*
*/
- public NameIDType getNameID() {
+ public NameIDType getNameID()
+ {
return nameID;
}
@@ -90,7 +93,8 @@
* {@link NameIDType }
*
*/
- public void setNameID(NameIDType value) {
+ public void setNameID(NameIDType value)
+ {
this.nameID = value;
}
@@ -102,7 +106,8 @@
* {@link EncryptedElementType }
*
*/
- public EncryptedElementType getEncryptedID() {
+ public EncryptedElementType getEncryptedID()
+ {
return encryptedID;
}
@@ -114,7 +119,8 @@
* {@link EncryptedElementType }
*
*/
- public void setEncryptedID(EncryptedElementType value) {
+ public void setEncryptedID(EncryptedElementType value)
+ {
this.encryptedID = value;
}
@@ -126,7 +132,8 @@
* {@link String }
*
*/
- public String getNewID() {
+ public String getNewID()
+ {
return newID;
}
@@ -138,7 +145,8 @@
* {@link String }
*
*/
- public void setNewID(String value) {
+ public void setNewID(String value)
+ {
this.newID = value;
}
@@ -150,7 +158,8 @@
* {@link EncryptedElementType }
*
*/
- public EncryptedElementType getNewEncryptedID() {
+ public EncryptedElementType getNewEncryptedID()
+ {
return newEncryptedID;
}
@@ -162,7 +171,8 @@
* {@link EncryptedElementType }
*
*/
- public void setNewEncryptedID(EncryptedElementType value) {
+ public void setNewEncryptedID(EncryptedElementType value)
+ {
this.newEncryptedID = value;
}
@@ -174,7 +184,8 @@
* {@link TerminateType }
*
*/
- public TerminateType getTerminate() {
+ public TerminateType getTerminate()
+ {
return terminate;
}
@@ -186,7 +197,8 @@
* {@link TerminateType }
*
*/
- public void setTerminate(TerminateType value) {
+ public void setTerminate(TerminateType value)
+ {
this.terminate = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingRequestType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingRequestType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingRequestType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -26,9 +26,7 @@
import org.picketlink.identity.federation.saml.v2.assertion.BaseIDAbstractType;
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
-
-
/**
* <p>Java class for NameIDMappingRequestType complex type.
*
@@ -52,19 +50,22 @@
* </pre>
*
*
- */
-public class NameIDMappingRequestType
-extends RequestAbstractType
-{
- protected BaseIDAbstractType baseID;
- protected NameIDType nameID;
- protected EncryptedElementType encryptedID;
+ */
+public class NameIDMappingRequestType extends RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected BaseIDAbstractType baseID;
+
+ protected NameIDType nameID;
+
+ protected EncryptedElementType encryptedID;
+
protected NameIDPolicyType nameIDPolicy;
-
- public NameIDMappingRequestType(String id, String version, XMLGregorianCalendar instant)
+ public NameIDMappingRequestType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -75,7 +76,8 @@
* {@link BaseIDAbstractType }
*
*/
- public BaseIDAbstractType getBaseID() {
+ public BaseIDAbstractType getBaseID()
+ {
return baseID;
}
@@ -87,7 +89,8 @@
* {@link BaseIDAbstractType }
*
*/
- public void setBaseID(BaseIDAbstractType value) {
+ public void setBaseID(BaseIDAbstractType value)
+ {
this.baseID = value;
}
@@ -99,7 +102,8 @@
* {@link NameIDType }
*
*/
- public NameIDType getNameID() {
+ public NameIDType getNameID()
+ {
return nameID;
}
@@ -111,7 +115,8 @@
* {@link NameIDType }
*
*/
- public void setNameID(NameIDType value) {
+ public void setNameID(NameIDType value)
+ {
this.nameID = value;
}
@@ -123,7 +128,8 @@
* {@link EncryptedElementType }
*
*/
- public EncryptedElementType getEncryptedID() {
+ public EncryptedElementType getEncryptedID()
+ {
return encryptedID;
}
@@ -135,7 +141,8 @@
* {@link EncryptedElementType }
*
*/
- public void setEncryptedID(EncryptedElementType value) {
+ public void setEncryptedID(EncryptedElementType value)
+ {
this.encryptedID = value;
}
@@ -147,7 +154,8 @@
* {@link NameIDPolicyType }
*
*/
- public NameIDPolicyType getNameIDPolicy() {
+ public NameIDPolicyType getNameIDPolicy()
+ {
return nameIDPolicy;
}
@@ -159,7 +167,8 @@
* {@link NameIDPolicyType }
*
*/
- public void setNameIDPolicy(NameIDPolicyType value) {
+ public void setNameIDPolicy(NameIDPolicyType value)
+ {
this.nameIDPolicy = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingResponseType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/NameIDMappingResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -21,6 +21,8 @@
*/
package org.picketlink.identity.federation.saml.v2.protocol;
+import javax.xml.datatype.XMLGregorianCalendar;
+
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
@@ -44,12 +46,19 @@
*
*
*/
-public class NameIDMappingResponseType
-extends StatusResponseType
+public class NameIDMappingResponseType extends StatusResponseType
{
- protected NameIDType nameID;
+ private static final long serialVersionUID = 1L;
+
+ protected NameIDType nameID;
+
protected EncryptedElementType encryptedID;
+ public NameIDMappingResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
/**
* Gets the value of the nameID property.
*
@@ -58,7 +67,8 @@
* {@link NameIDType }
*
*/
- public NameIDType getNameID() {
+ public NameIDType getNameID()
+ {
return nameID;
}
@@ -70,7 +80,8 @@
* {@link NameIDType }
*
*/
- public void setNameID(NameIDType value) {
+ public void setNameID(NameIDType value)
+ {
this.nameID = value;
}
@@ -82,7 +93,8 @@
* {@link EncryptedElementType }
*
*/
- public EncryptedElementType getEncryptedID() {
+ public EncryptedElementType getEncryptedID()
+ {
return encryptedID;
}
@@ -94,7 +106,8 @@
* {@link EncryptedElementType }
*
*/
- public void setEncryptedID(EncryptedElementType value) {
+ public void setEncryptedID(EncryptedElementType value)
+ {
this.encryptedID = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/RequestAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/RequestAbstractType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/RequestAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -25,12 +25,10 @@
import javax.xml.datatype.XMLGregorianCalendar;
+import org.picketlink.identity.federation.saml.common.CommonRequestAbstractType;
import org.picketlink.identity.federation.saml.v2.SAML2Object;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
-import org.picketlink.identity.xmlsec.w3.xmldsig.SignatureType;
-import org.w3c.dom.Element;
-
/**
* <p>Java class for RequestAbstractType complex type.
*
@@ -56,26 +54,26 @@
* </pre>
*
*
- */
-public abstract class RequestAbstractType implements SAML2Object
+ */
+public abstract class RequestAbstractType extends CommonRequestAbstractType implements SAML2Object
{
- protected String id;
+ private static final long serialVersionUID = 1L;
- protected NameIDType issuer;
- protected Element signature;
+ protected NameIDType issuer;
+
protected ExtensionsType extensions;
- protected String version;
- protected XMLGregorianCalendar issueInstant;
- protected URI destination;
+
+ protected String version = "2.0";
+
+ protected URI destination;
+
protected String consent;
- public RequestAbstractType( String id, String version, XMLGregorianCalendar instant )
+ public RequestAbstractType(String id, XMLGregorianCalendar instant)
{
- this.id = id;
- this.version = version;
- this.issueInstant = instant;
+ super(id, instant);
}
-
+
/**
* Gets the value of the issuer property.
*
@@ -84,7 +82,8 @@
* {@link NameIDType }
*
*/
- public NameIDType getIssuer() {
+ public NameIDType getIssuer()
+ {
return issuer;
}
@@ -96,35 +95,12 @@
* {@link NameIDType }
*
*/
- public void setIssuer(NameIDType value) {
+ public void setIssuer(NameIDType value)
+ {
this.issuer = value;
}
/**
- * Gets the value of the signature property.
- *
- * @return
- * possible object is
- * {@link SignatureType }
- *
- */
- public Element getSignature() {
- return signature;
- }
-
- /**
- * Sets the value of the signature property.
- *
- * @param value
- * allowed object is
- * {@link SignatureType }
- *
- */
- public void setSignature(Element value) {
- this.signature = value;
- }
-
- /**
* Gets the value of the extensions property.
*
* @return
@@ -132,7 +108,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -144,23 +121,12 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
/**
- * Gets the value of the id property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getID() {
- return id;
- }
-
- /**
* Gets the value of the version property.
*
* @return
@@ -168,23 +134,12 @@
* {@link String }
*
*/
- public String getVersion() {
+ public String getVersion()
+ {
return version;
- }
+ }
/**
- * Gets the value of the issueInstant property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getIssueInstant() {
- return issueInstant;
- }
-
- /**
* Gets the value of the destination property.
*
* @return
@@ -192,7 +147,7 @@
* {@link String }
*
*/
- public URI getDestination()
+ public URI getDestination()
{
return destination;
}
@@ -205,7 +160,8 @@
* {@link String }
*
*/
- public void setDestination( URI value) {
+ public void setDestination(URI value)
+ {
this.destination = value;
}
@@ -217,7 +173,8 @@
* {@link String }
*
*/
- public String getConsent() {
+ public String getConsent()
+ {
return consent;
}
@@ -229,8 +186,8 @@
* {@link String }
*
*/
- public void setConsent(String value) {
+ public void setConsent(String value)
+ {
this.consent = value;
}
-
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ResponseType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/ResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -25,6 +25,8 @@
import java.util.Collections;
import java.util.List;
+import javax.xml.datatype.XMLGregorianCalendar;
+
import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
import org.picketlink.identity.federation.saml.v2.assertion.EncryptedAssertionType;
@@ -47,87 +49,105 @@
* </pre>
*
*
- */
-public class ResponseType
-extends StatusResponseType
-{
+ */
+public class ResponseType extends StatusResponseType
+{
+ private static final long serialVersionUID = 1L;
+
protected List<RTChoiceType> assertions = new ArrayList<ResponseType.RTChoiceType>();
+ public ResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public ResponseType(StatusResponseType srt)
+ {
+ super(srt);
+ }
+
/**
* Add an assertion
* @param choice
*/
- public void addAssertion( RTChoiceType choice )
+ public void addAssertion(RTChoiceType choice)
{
assertions.add(choice);
}
-
+
/**
* Remove an assertion
* @param choice
*/
- public void removeAssertion( RTChoiceType choice )
+ public void removeAssertion(RTChoiceType choice)
{
assertions.remove(choice);
}
-
+
/**
* Replace the first assertion with the passed assertion
* @param id id of the old assertion
* @param newAssertion
*/
- public void replaceAssertion( String id, RTChoiceType newAssertion )
+ public void replaceAssertion(String id, RTChoiceType newAssertion)
{
int index = 0;
- if( id != null && !id.isEmpty())
+ if (id != null && !id.isEmpty())
{
- for( RTChoiceType assertion : assertions )
+ for (RTChoiceType assertion : assertions)
{
- if( assertion.getID().equals(id) )
+ if (assertion.getID().equals(id))
{
break;
}
index++;
- }
+ }
}
- assertions.remove(index);
+ assertions.remove(index);
assertions.add(index, newAssertion);
}
/**
* Gets a read only list of assertions
*/
- public List<RTChoiceType> getAssertions()
+ public List<RTChoiceType> getAssertions()
{
- return Collections.unmodifiableList( assertions );
+ return Collections.unmodifiableList(assertions);
}
public static class RTChoiceType
{
private AssertionType assertion;
+
private EncryptedAssertionType encryptedAssertion;
+
private String id;
+
public RTChoiceType(AssertionType assertion)
- {
+ {
this.assertion = assertion;
this.id = assertion.getID();
}
+
public RTChoiceType(EncryptedAssertionType encryptedAssertion)
- {
+ {
this.encryptedAssertion = encryptedAssertion;
-
+
}
+
public AssertionType getAssertion()
{
return assertion;
}
+
public EncryptedAssertionType getEncryptedAssertion()
{
return encryptedAssertion;
- }
+ }
+
public String getID()
{
- return id;
+ return id;
}
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusDetailType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusDetailType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusDetailType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -21,11 +21,8 @@
*/
package org.picketlink.identity.federation.saml.v2.protocol;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import org.picketlink.identity.federation.saml.common.CommonStatusDetailType;
-
/**
* <p>Java class for StatusDetailType complex type.
*
@@ -44,34 +41,8 @@
* </pre>
*
*
- */
-public class StatusDetailType
+ */
+public class StatusDetailType extends CommonStatusDetailType
{
- protected List<Object> any = new ArrayList<Object>();
-
- /**
- * Add status detail
- * @param obj
- */
- public void addStatusDetail( Object obj )
- {
- this.any.add( obj );
- }
-
- /**
- * Remove status detail
- * @param obj
- */
- public void removeStatusDetail( Object obj )
- {
- this.any.remove( obj );
- }
-
- /**
- * Gets the value of the any property. Read-Only list
- */
- public List<Object> getAny()
- {
- return Collections.unmodifiableList( this.any );
- }
+ private static final long serialVersionUID = 1L;
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusResponseType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/StatusResponseType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -23,11 +23,10 @@
import javax.xml.datatype.XMLGregorianCalendar;
+import org.picketlink.identity.federation.saml.common.CommonResponseType;
import org.picketlink.identity.federation.saml.v2.SAML2Object;
import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
-import org.w3c.dom.Element;
-
/**
* <p>Java class for StatusResponseType complex type.
*
@@ -55,20 +54,44 @@
* </pre>
*
*
- */
-public class StatusResponseType implements SAML2Object
+ */
+public class StatusResponseType extends CommonResponseType implements SAML2Object
{
+ private static final long serialVersionUID = 1L;
+
protected NameIDType issuer;
- protected Element signature;
- protected ExtensionsType extensions;
- protected StatusType status;
- protected String id;
- protected String inResponseTo;
- protected String version;
- protected XMLGregorianCalendar issueInstant;
- protected String destination;
+
+ protected ExtensionsType extensions;
+
+ protected StatusType status;
+
+ protected String id;
+
+ protected String version = "2.0";
+
+ protected XMLGregorianCalendar issueInstant;
+
+ protected String destination;
+
protected String consent;
+ public StatusResponseType(String id, XMLGregorianCalendar issueInstant)
+ {
+ super(id, issueInstant);
+ }
+
+ public StatusResponseType(StatusResponseType srt)
+ {
+ this(srt.getID(), srt.getIssueInstant());
+ this.issuer = srt.getIssuer();
+ this.signature = srt.getSignature();
+ this.extensions = srt.getExtensions();
+ this.status = srt.getStatus();
+ this.inResponseTo = srt.getInResponseTo();
+ this.destination = srt.getDestination();
+ this.consent = srt.getConsent();
+ }
+
/**
* Gets the value of the issuer property.
*
@@ -77,7 +100,8 @@
* {@link NameIDType }
*
*/
- public NameIDType getIssuer() {
+ public NameIDType getIssuer()
+ {
return issuer;
}
@@ -89,35 +113,12 @@
* {@link NameIDType }
*
*/
- public void setIssuer(NameIDType value) {
+ public void setIssuer(NameIDType value)
+ {
this.issuer = value;
}
/**
- * Gets the value of the signature property.
- *
- * @return
- * possible object is
- * {@link SignatureType }
- *
- */
- public Element getSignature() {
- return signature;
- }
-
- /**
- * Sets the value of the signature property.
- *
- * @param value
- * allowed object is
- * {@link SignatureType }
- *
- */
- public void setSignature( Element value) {
- this.signature = value;
- }
-
- /**
* Gets the value of the extensions property.
*
* @return
@@ -125,7 +126,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -137,7 +139,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -149,7 +152,8 @@
* {@link StatusType }
*
*/
- public StatusType getStatus() {
+ public StatusType getStatus()
+ {
return status;
}
@@ -161,59 +165,12 @@
* {@link StatusType }
*
*/
- public void setStatus(StatusType value) {
+ public void setStatus(StatusType value)
+ {
this.status = value;
}
/**
- * Gets the value of the id property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getID() {
- return id;
- }
-
- /**
- * Sets the value of the id property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setID(String value) {
- this.id = value;
- }
-
- /**
- * Gets the value of the inResponseTo property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getInResponseTo() {
- return inResponseTo;
- }
-
- /**
- * Sets the value of the inResponseTo property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setInResponseTo(String value) {
- this.inResponseTo = value;
- }
-
- /**
* Gets the value of the version property.
*
* @return
@@ -221,47 +178,12 @@
* {@link String }
*
*/
- public String getVersion() {
+ public String getVersion()
+ {
return version;
}
/**
- * Sets the value of the version property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setVersion(String value) {
- this.version = value;
- }
-
- /**
- * Gets the value of the issueInstant property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- public XMLGregorianCalendar getIssueInstant() {
- return issueInstant;
- }
-
- /**
- * Sets the value of the issueInstant property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setIssueInstant(XMLGregorianCalendar value) {
- this.issueInstant = value;
- }
-
- /**
* Gets the value of the destination property.
*
* @return
@@ -269,7 +191,8 @@
* {@link String }
*
*/
- public String getDestination() {
+ public String getDestination()
+ {
return destination;
}
@@ -281,7 +204,8 @@
* {@link String }
*
*/
- public void setDestination(String value) {
+ public void setDestination(String value)
+ {
this.destination = value;
}
@@ -293,7 +217,8 @@
* {@link String }
*
*/
- public String getConsent() {
+ public String getConsent()
+ {
return consent;
}
@@ -305,8 +230,8 @@
* {@link String }
*
*/
- public void setConsent(String value) {
+ public void setConsent(String value)
+ {
this.consent = value;
}
-
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/SubjectQueryAbstractType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/SubjectQueryAbstractType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/SubjectQueryAbstractType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -25,7 +25,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
-
/**
* <p>Java class for SubjectQueryAbstractType complex type.
*
@@ -44,15 +43,16 @@
* </pre>
*
*
- */
-public abstract class SubjectQueryAbstractType
-extends RequestAbstractType
-{
- protected SubjectType subject;
-
- public SubjectQueryAbstractType(String id, String version, XMLGregorianCalendar instant)
+ */
+public abstract class SubjectQueryAbstractType extends RequestAbstractType
+{
+ private static final long serialVersionUID = 1L;
+
+ protected SubjectType subject;
+
+ public SubjectQueryAbstractType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
public void setSubject(SubjectType subject)
@@ -60,8 +60,6 @@
this.subject = subject;
}
-
-
/**
* Gets the value of the subject property.
*
@@ -70,7 +68,7 @@
* {@link SubjectType }
*
*/
- public SubjectType getSubject()
+ public SubjectType getSubject()
{
return subject;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLAuthzDecisionQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLAuthzDecisionQueryType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLAuthzDecisionQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -25,7 +25,6 @@
import org.jboss.security.xacml.core.model.context.RequestType;
-
/**
* <p>Java class for XACMLAuthzDecisionQueryType complex type.
*
@@ -46,18 +45,20 @@
* </pre>
*
*
- */
-public class XACMLAuthzDecisionQueryType
-extends RequestAbstractType
+ */
+public class XACMLAuthzDecisionQueryType extends RequestAbstractType
{
+ private static final long serialVersionUID = 1L;
+
protected RequestType request;
+
protected Boolean inputContextOnly;
+
protected Boolean returnContext;
-
- public XACMLAuthzDecisionQueryType(String id, String version, XMLGregorianCalendar instant)
+ public XACMLAuthzDecisionQueryType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
/**
@@ -68,7 +69,8 @@
* {@link RequestType }
*
*/
- public RequestType getRequest() {
+ public RequestType getRequest()
+ {
return request;
}
@@ -80,7 +82,8 @@
* {@link RequestType }
*
*/
- public void setRequest(RequestType value) {
+ public void setRequest(RequestType value)
+ {
this.request = value;
}
@@ -92,10 +95,14 @@
* {@link Boolean }
*
*/
- public boolean isInputContextOnly() {
- if (inputContextOnly == null) {
+ public boolean isInputContextOnly()
+ {
+ if (inputContextOnly == null)
+ {
return false;
- } else {
+ }
+ else
+ {
return inputContextOnly;
}
}
@@ -108,7 +115,8 @@
* {@link Boolean }
*
*/
- public void setInputContextOnly(Boolean value) {
+ public void setInputContextOnly(Boolean value)
+ {
this.inputContextOnly = value;
}
@@ -120,10 +128,14 @@
* {@link Boolean }
*
*/
- public boolean isReturnContext() {
- if (returnContext == null) {
+ public boolean isReturnContext()
+ {
+ if (returnContext == null)
+ {
return false;
- } else {
+ }
+ else
+ {
return returnContext;
}
}
@@ -136,7 +148,8 @@
* {@link Boolean }
*
*/
- public void setReturnContext(Boolean value) {
+ public void setReturnContext(Boolean value)
+ {
this.returnContext = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLPolicyQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLPolicyQueryType.java 2011-06-21 21:10:53 UTC (rev 1021)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/protocol/XACMLPolicyQueryType.java 2011-06-23 01:04:12 UTC (rev 1022)
@@ -27,7 +27,6 @@
import org.jboss.security.xacml.core.model.policy.IdReferenceType;
import org.jboss.security.xacml.core.model.policy.TargetType;
-
/**
* <p>Java class for XACMLPolicyQueryType complex type.
*
@@ -49,57 +48,67 @@
* </pre>
*
*
- */
-public class XACMLPolicyQueryType
-extends RequestAbstractType
+ */
+public class XACMLPolicyQueryType extends RequestAbstractType
{
+ private static final long serialVersionUID = 1L;
+
public static class ChoiceType
{
private RequestType request;
+
private TargetType target;
+
private IdReferenceType policySetIDReference;
+
private IdReferenceType policyIdReference;
+
public RequestType getRequest()
{
return request;
}
+
public void setRequest(RequestType request)
{
this.request = request;
}
+
public TargetType getTarget()
{
return target;
}
+
public void setTarget(TargetType target)
{
this.target = target;
}
+
public IdReferenceType getPolicySetIDReference()
{
return policySetIDReference;
}
+
public void setPolicySetIDReference(IdReferenceType policySetIDReference)
{
this.policySetIDReference = policySetIDReference;
}
+
public IdReferenceType getPolicyIdReference()
{
return policyIdReference;
}
+
public void setPolicyIdReference(IdReferenceType policyIdReference)
{
this.policyIdReference = policyIdReference;
- }
+ }
}
protected ChoiceType choiceType;
-
-
- public XACMLPolicyQueryType(String id, String version, XMLGregorianCalendar instant)
+ public XACMLPolicyQueryType(String id, XMLGregorianCalendar instant)
{
- super(id, version, instant);
+ super(id, instant);
}
public ChoiceType getChoiceType()
Added: federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-assertion-1.0.xsd
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-assertion-1.0.xsd (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-assertion-1.0.xsd 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified" version="1.1">
+ <import namespace="http://www.w3.org/2000/09/xmldsig#"
+ schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: oasis-sstc-saml-schema-assertion-1.1
+ Location: http://www.oasis-open.org/committees/documents.php?wg_abbrev=security
+ Revision history:
+ V1.0 (November, 2002):
+ Initial standard schema.
+ V1.1 (September, 2003):
+ * Note that V1.1 of this schema has the same XML namespace as V1.0.
+ Rebased ID content directly on XML Schema types
+ Added DoNotCacheCondition element and DoNotCacheConditionType
+ </documentation>
+ </annotation>
+ <simpleType name="DecisionType">
+ <restriction base="string">
+
+ <enumeration value="Permit"/>
+ <enumeration value="Deny"/>
+ <enumeration value="Indeterminate"/>
+ </restriction>
+ </simpleType>
+ <element name="AssertionIDReference" type="NCName"/>
+ <element name="Assertion" type="saml:AssertionType"/>
+ <complexType name="AssertionType">
+ <sequence>
+
+ <element ref="saml:Conditions" minOccurs="0"/>
+ <element ref="saml:Advice" minOccurs="0"/>
+ <choice maxOccurs="unbounded">
+ <element ref="saml:Statement"/>
+ <element ref="saml:SubjectStatement"/>
+ <element ref="saml:AuthenticationStatement"/>
+ <element ref="saml:AuthorizationDecisionStatement"/>
+ <element ref="saml:AttributeStatement"/>
+ </choice>
+
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="AssertionID" type="ID" use="required"/>
+ <attribute name="Issuer" type="string" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+ <element name="Conditions" type="saml:ConditionsType"/>
+
+ <complexType name="ConditionsType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AudienceRestrictionCondition"/>
+ <element ref="saml:DoNotCacheCondition"/>
+ <element ref="saml:Condition"/>
+ </choice>
+ <attribute name="NotBefore" type="dateTime" use="optional"/>
+ <attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
+ </complexType>
+
+ <element name="Condition" type="saml:ConditionAbstractType"/>
+ <complexType name="ConditionAbstractType" abstract="true"/>
+ <element name="AudienceRestrictionCondition" type="saml:AudienceRestrictionConditionType"/>
+ <complexType name="AudienceRestrictionConditionType">
+ <complexContent>
+ <extension base="saml:ConditionAbstractType">
+ <sequence>
+ <element ref="saml:Audience" maxOccurs="unbounded"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Audience" type="anyURI"/>
+ <element name="DoNotCacheCondition" type="saml:DoNotCacheConditionType"/>
+ <complexType name="DoNotCacheConditionType">
+ <complexContent>
+ <extension base="saml:ConditionAbstractType"/>
+ </complexContent>
+
+ </complexType>
+ <element name="Advice" type="saml:AdviceType"/>
+ <complexType name="AdviceType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </complexType>
+
+ <element name="Statement" type="saml:StatementAbstractType"/>
+ <complexType name="StatementAbstractType" abstract="true"/>
+ <element name="SubjectStatement" type="saml:SubjectStatementAbstractType"/>
+ <complexType name="SubjectStatementAbstractType" abstract="true">
+ <complexContent>
+ <extension base="saml:StatementAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Subject" type="saml:SubjectType"/>
+ <complexType name="SubjectType">
+ <choice>
+ <sequence>
+ <element ref="saml:NameIdentifier"/>
+ <element ref="saml:SubjectConfirmation" minOccurs="0"/>
+
+ </sequence>
+ <element ref="saml:SubjectConfirmation"/>
+ </choice>
+ </complexType>
+ <element name="NameIdentifier" type="saml:NameIdentifierType"/>
+ <complexType name="NameIdentifierType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="NameQualifier" type="string" use="optional"/>
+
+ <attribute name="Format" type="anyURI" use="optional"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="SubjectConfirmation" type="saml:SubjectConfirmationType"/>
+ <complexType name="SubjectConfirmationType">
+ <sequence>
+ <element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/>
+ <element ref="saml:SubjectConfirmationData" minOccurs="0"/>
+
+ <element ref="ds:KeyInfo" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="SubjectConfirmationData" type="anyType"/>
+ <element name="ConfirmationMethod" type="anyURI"/>
+ <element name="AuthenticationStatement" type="saml:AuthenticationStatementType"/>
+ <complexType name="AuthenticationStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+
+ <sequence>
+ <element ref="saml:SubjectLocality" minOccurs="0"/>
+ <element ref="saml:AuthorityBinding" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="AuthenticationMethod" type="anyURI" use="required"/>
+ <attribute name="AuthenticationInstant" type="dateTime" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <element name="SubjectLocality" type="saml:SubjectLocalityType"/>
+ <complexType name="SubjectLocalityType">
+ <attribute name="IPAddress" type="string" use="optional"/>
+ <attribute name="DNSAddress" type="string" use="optional"/>
+ </complexType>
+ <element name="AuthorityBinding" type="saml:AuthorityBindingType"/>
+ <complexType name="AuthorityBindingType">
+ <attribute name="AuthorityKind" type="QName" use="required"/>
+ <attribute name="Location" type="anyURI" use="required"/>
+
+ <attribute name="Binding" type="anyURI" use="required"/>
+ </complexType>
+ <element name="AuthorizationDecisionStatement" type="saml:AuthorizationDecisionStatementType"/>
+ <complexType name="AuthorizationDecisionStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ <attribute name="Decision" type="saml:DecisionType" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Action" type="saml:ActionType"/>
+ <complexType name="ActionType">
+ <simpleContent>
+
+ <extension base="string">
+ <attribute name="Namespace" type="anyURI"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="Evidence" type="saml:EvidenceType"/>
+ <complexType name="EvidenceType">
+ <choice maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ </choice>
+ </complexType>
+ <element name="AttributeStatement" type="saml:AttributeStatementType"/>
+ <complexType name="AttributeStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Attribute" maxOccurs="unbounded"/>
+
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeDesignator" type="saml:AttributeDesignatorType"/>
+ <complexType name="AttributeDesignatorType">
+ <attribute name="AttributeName" type="string" use="required"/>
+ <attribute name="AttributeNamespace" type="anyURI" use="required"/>
+ </complexType>
+
+ <element name="Attribute" type="saml:AttributeType"/>
+ <complexType name="AttributeType">
+ <complexContent>
+ <extension base="saml:AttributeDesignatorType">
+ <sequence>
+ <element ref="saml:AttributeValue" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+
+ </complexType>
+ <element name="AttributeValue" type="anyType"/>
+</schema>
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-protocol-1.1.xsd
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-protocol-1.1.xsd (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/resources/schema/saml/v1/saml-schema-protocol-1.1.xsd 2011-06-23 01:04:12 UTC (rev 1022)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:protocol"
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
+ xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified" version="1.1">
+ <import namespace="urn:oasis:names:tc:SAML:1.0:assertion"
+ schemaLocation="oasis-sstc-saml-schema-assertion-1.1.xsd"/>
+ <import namespace="http://www.w3.org/2000/09/xmldsig#"
+ schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: oasis-sstc-saml-schema-protocol-1.1
+ Location: http://www.oasis-open.org/committees/documents.php?wg_abbrev=security
+ Revision history:
+ V1.0 (November, 2002):
+ Initial standard schema.
+ V1.1 (September, 2003):
+ * Note that V1.1 of this schema has the same XML namespace as V1.0.
+ Rebased ID content directly on XML Schema types
+ </documentation>
+ </annotation>
+ <complexType name="RequestAbstractType" abstract="true">
+
+ <sequence>
+ <element ref="samlp:RespondWith" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="RequestID" type="ID" use="required"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+
+ <element name="RespondWith" type="QName"/>
+ <element name="Request" type="samlp:RequestType"/>
+ <complexType name="RequestType">
+ <complexContent>
+ <extension base="samlp:RequestAbstractType">
+ <choice>
+ <element ref="samlp:Query"/>
+ <element ref="samlp:SubjectQuery"/>
+ <element ref="samlp:AuthenticationQuery"/>
+
+ <element ref="samlp:AttributeQuery"/>
+ <element ref="samlp:AuthorizationDecisionQuery"/>
+ <element ref="saml:AssertionIDReference" maxOccurs="unbounded"/>
+ <element ref="samlp:AssertionArtifact" maxOccurs="unbounded"/>
+ </choice>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AssertionArtifact" type="string"/>
+
+ <element name="Query" type="samlp:QueryAbstractType"/>
+ <complexType name="QueryAbstractType" abstract="true"/>
+ <element name="SubjectQuery" type="samlp:SubjectQueryAbstractType"/>
+ <complexType name="SubjectQueryAbstractType" abstract="true">
+ <complexContent>
+ <extension base="samlp:QueryAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthenticationQuery" type="samlp:AuthenticationQueryType"/>
+ <complexType name="AuthenticationQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <attribute name="AuthenticationMethod" type="anyURI"/>
+ </extension>
+
+ </complexContent>
+ </complexType>
+ <element name="AttributeQuery" type="samlp:AttributeQueryType"/>
+ <complexType name="AttributeQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:AttributeDesignator" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+
+ <attribute name="Resource" type="anyURI" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthorizationDecisionQuery" type="samlp:AuthorizationDecisionQueryType"/>
+ <complexType name="AuthorizationDecisionQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="ResponseAbstractType" abstract="true">
+ <sequence>
+
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="ResponseID" type="ID" use="required"/>
+ <attribute name="InResponseTo" type="NCName" use="optional"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ <attribute name="Recipient" type="anyURI" use="optional"/>
+ </complexType>
+
+ <element name="Response" type="samlp:ResponseType"/>
+ <complexType name="ResponseType">
+ <complexContent>
+ <extension base="samlp:ResponseAbstractType">
+ <sequence>
+ <element ref="samlp:Status"/>
+ <element ref="saml:Assertion" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+
+ </complexContent>
+ </complexType>
+ <element name="Status" type="samlp:StatusType"/>
+ <complexType name="StatusType">
+ <sequence>
+ <element ref="samlp:StatusCode"/>
+ <element ref="samlp:StatusMessage" minOccurs="0"/>
+ <element ref="samlp:StatusDetail" minOccurs="0"/>
+ </sequence>
+
+ </complexType>
+ <element name="StatusCode" type="samlp:StatusCodeType"/>
+ <complexType name="StatusCodeType">
+ <sequence>
+ <element ref="samlp:StatusCode" minOccurs="0"/>
+ </sequence>
+ <attribute name="Value" type="QName" use="required"/>
+ </complexType>
+ <element name="StatusMessage" type="string"/>
+
+ <element name="StatusDetail" type="samlp:StatusDetailType"/>
+ <complexType name="StatusDetailType">
+ <sequence>
+ <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+</schema>
\ No newline at end of file
13 years, 6 months
Picketlink SVN: r1021 - integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-21 17:10:53 -0400 (Tue, 21 Jun 2011)
New Revision: 1021
Modified:
integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java
Log:
use the saml obj model
Modified: integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java
===================================================================
--- integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java 2011-06-21 21:04:32 UTC (rev 1020)
+++ integration-tests/trunk/picketlink-sts-tests/src/test/java/org/picketlink/test/integration/sts/PicketLinkSTSIntegrationUnitTestCase.java 2011-06-21 21:10:53 UTC (rev 1021)
@@ -44,14 +44,14 @@
import org.picketlink.identity.federation.core.wstrust.WSTrustUtil;
import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AudienceRestrictionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.ConditionAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.ConditionsType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectConfirmationDataType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectConfirmationType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectType;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.AudienceRestrictionType;
+import org.picketlink.identity.federation.saml.v2.assertion.ConditionAbstractType;
+import org.picketlink.identity.federation.saml.v2.assertion.ConditionsType;
+import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationDataType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
import org.picketlink.identity.federation.ws.trust.BinarySecretType;
import org.picketlink.identity.federation.ws.trust.EntropyType;
import org.picketlink.identity.federation.ws.trust.UseKeyType;
13 years, 6 months
Picketlink SVN: r1020 - in picketlink-seam/trunk: picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration and 2 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-21 17:04:32 -0400 (Tue, 21 Jun 2011)
New Revision: 1020
Modified:
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageFactory.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageReceiver.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageSender.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMetaDataProvider.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutReceiver.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutSender.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnReceiver.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnSender.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SeamSamlPrincipal.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlIdentityProvider.java
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java
picketlink-seam/trunk/seam-sp/src/main/java/org/picketlink/identity/seam/federation/Authenticator.java
Log:
use the saml object model moved from newmodel pkg
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageFactory.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageFactory.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageFactory.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -33,13 +33,13 @@
import org.picketlink.identity.federation.core.saml.v2.common.IDGenerator;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.AuthnRequestType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.LogoutRequestType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.RequestAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusCodeType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusResponseType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusType;
+import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
+import org.picketlink.identity.federation.saml.v2.protocol.AuthnRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.LogoutRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusCodeType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusType;
import org.picketlink.identity.seam.federation.configuration.ServiceProvider;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageReceiver.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageReceiver.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageReceiver.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -40,8 +40,8 @@
import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.RequestAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
import org.picketlink.identity.federation.web.util.RedirectBindingUtil;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
import org.picketlink.identity.seam.federation.configuration.ServiceProvider;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageSender.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageSender.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMessageSender.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -49,8 +49,8 @@
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.saml.v2.writers.SAMLResponseWriter;
import org.picketlink.identity.federation.core.util.StaxUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.RequestAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
import org.picketlink.identity.federation.web.util.HTTPRedirectUtil;
import org.picketlink.identity.federation.web.util.PostBindingUtil;
import org.picketlink.identity.federation.web.util.RedirectBindingSignatureUtil;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMetaDataProvider.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMetaDataProvider.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlMetaDataProvider.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -35,12 +35,12 @@
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.saml.v2.writers.SAMLMetadataWriter;
import org.picketlink.identity.federation.core.util.StaxUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IndexedEndpointType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.KeyDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.SPSSODescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.IndexedEndpointType;
+import org.picketlink.identity.federation.saml.v2.metadata.KeyDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.SPSSODescriptorType;
import org.picketlink.identity.seam.federation.configuration.ServiceProvider;
import org.w3c.dom.Element;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutReceiver.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutReceiver.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutReceiver.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -32,9 +32,9 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.security.Identity;
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.LogoutRequestType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.RequestAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.LogoutRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
import org.picketlink.identity.seam.federation.configuration.Binding;
import org.picketlink.identity.seam.federation.configuration.SamlEndpoint;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutSender.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutSender.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleLogoutSender.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -29,7 +29,7 @@
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.security.Identity;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.LogoutRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.LogoutRequestType;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnReceiver.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnReceiver.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnReceiver.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -43,23 +43,23 @@
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
import org.picketlink.identity.federation.core.saml.v2.util.XMLTimeUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeStatementType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AuthnStatementType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.EncryptedAssertionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.EncryptedElementType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.StatementAbstractType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectConfirmationDataType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectConfirmationType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.SubjectType.STSubType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.ResponseType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.ResponseType.RTChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusResponseType;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.StatusType;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
+import org.picketlink.identity.federation.saml.v2.assertion.AuthnStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.EncryptedAssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.EncryptedElementType;
+import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
+import org.picketlink.identity.federation.saml.v2.assertion.StatementAbstractType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationDataType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectType;
+import org.picketlink.identity.federation.saml.v2.assertion.SubjectType.STSubType;
+import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusResponseType;
+import org.picketlink.identity.federation.saml.v2.protocol.StatusType;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
import org.picketlink.identity.seam.federation.configuration.ServiceProvider;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnSender.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnSender.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SamlSingleSignOnSender.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -30,7 +30,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.core.Events;
import org.jboss.seam.security.Identity;
-import org.picketlink.identity.federation.newmodel.saml.v2.protocol.AuthnRequestType;
+import org.picketlink.identity.federation.saml.v2.protocol.AuthnRequestType;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SeamSamlPrincipal.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SeamSamlPrincipal.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/SeamSamlPrincipal.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -26,9 +26,9 @@
import java.util.LinkedList;
import java.util.List;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
+import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.identity.seam.federation.configuration.SamlIdentityProvider;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -40,11 +40,11 @@
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
import org.picketlink.identity.federation.core.util.StringUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntitiesDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IDPSSODescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.IDPSSODescriptorType;
import org.picketlink.identity.seam.federation.jaxb.config.SamlConfigType;
import org.picketlink.identity.seam.federation.jaxb.config.SamlIdentityProviderType;
import org.picketlink.identity.seam.federation.util.PicketLinkSeamUtil;
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlIdentityProvider.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlIdentityProvider.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlIdentityProvider.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -29,9 +29,9 @@
import org.picketlink.identity.federation.api.saml.v2.metadata.MetaDataExtractor;
import org.picketlink.identity.federation.core.util.StringUtil;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IDPSSODescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.KeyDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.KeyTypes;
+import org.picketlink.identity.federation.saml.v2.metadata.IDPSSODescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.KeyDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.KeyTypes;
import org.picketlink.identity.seam.federation.SamlProfile;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -26,7 +26,7 @@
import java.util.LinkedList;
import java.util.List;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EndpointType;
+import org.picketlink.identity.federation.saml.v2.metadata.EndpointType;
import org.picketlink.identity.seam.federation.SamlProfile;
/**
Modified: picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -29,11 +29,11 @@
import org.junit.Test;
import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntitiesDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IDPSSODescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
+import org.picketlink.identity.federation.saml.v2.metadata.IDPSSODescriptorType;
import org.picketlink.identity.seam.federation.configuration.SamlConfiguration;
/**
Modified: picketlink-seam/trunk/seam-sp/src/main/java/org/picketlink/identity/seam/federation/Authenticator.java
===================================================================
--- picketlink-seam/trunk/seam-sp/src/main/java/org/picketlink/identity/seam/federation/Authenticator.java 2011-06-21 20:53:02 UTC (rev 1019)
+++ picketlink-seam/trunk/seam-sp/src/main/java/org/picketlink/identity/seam/federation/Authenticator.java 2011-06-21 21:04:32 UTC (rev 1020)
@@ -26,7 +26,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.security.Identity;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
/**
* @author Marcel Kolsteren
13 years, 6 months
Picketlink SVN: r1019 - in trust/trunk/jbossws/src: test/java/org/picketlink/test/trust/jbossws/jaas and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-21 16:53:02 -0400 (Tue, 21 Jun 2011)
New Revision: 1019
Modified:
trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/jaas/SAMLRoleLoginModule.java
trust/trunk/jbossws/src/test/java/org/picketlink/test/trust/jbossws/jaas/SAMLRoleLoginModuleUnitTestCase.java
Log:
use the moved pkg saml model
Modified: trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/jaas/SAMLRoleLoginModule.java
===================================================================
--- trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/jaas/SAMLRoleLoginModule.java 2011-06-21 20:50:57 UTC (rev 1018)
+++ trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/jaas/SAMLRoleLoginModule.java 2011-06-21 20:53:02 UTC (rev 1019)
@@ -39,7 +39,7 @@
import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.core.wstrust.SamlCredential;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
/**
* <p>
Modified: trust/trunk/jbossws/src/test/java/org/picketlink/test/trust/jbossws/jaas/SAMLRoleLoginModuleUnitTestCase.java
===================================================================
--- trust/trunk/jbossws/src/test/java/org/picketlink/test/trust/jbossws/jaas/SAMLRoleLoginModuleUnitTestCase.java 2011-06-21 20:50:57 UTC (rev 1018)
+++ trust/trunk/jbossws/src/test/java/org/picketlink/test/trust/jbossws/jaas/SAMLRoleLoginModuleUnitTestCase.java 2011-06-21 20:53:02 UTC (rev 1019)
@@ -53,9 +53,9 @@
import org.picketlink.identity.federation.core.saml.v2.writers.SAMLAssertionWriter;
import org.picketlink.identity.federation.core.util.StaxUtil;
import org.picketlink.identity.federation.core.wstrust.SamlCredential;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AttributeStatementType;
-import org.picketlink.identity.federation.newmodel.saml.v2.assertion.NameIDType;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType;
+import org.picketlink.identity.federation.saml.v2.assertion.NameIDType;
import org.picketlink.trust.jbossws.jaas.SAMLRoleLoginModule;
/**
13 years, 6 months
Picketlink SVN: r1018 - federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-06-21 16:50:57 -0400 (Tue, 21 Jun 2011)
New Revision: 1018
Modified:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AdditionalMetadataLocationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AffiliationDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeAuthorityDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeConsumingServiceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AuthnAuthorityDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactTypeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EndpointType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntitiesDescriptorType.java
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/ExtensionsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IDPSSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IndexedEndpointType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyTypes.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedNameType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedURIType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/OrganizationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/PDPDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RequestedAttributeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SPSSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SSODescriptorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/package-info.java
Log:
add license header
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AdditionalMetadataLocationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AdditionalMetadataLocationType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AdditionalMetadataLocationType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.net.URI;
@@ -2,3 +23,2 @@
-
/**
@@ -19,10 +39,11 @@
* </pre>
*
*
- */
-public class AdditionalMetadataLocationType
+ */
+public class AdditionalMetadataLocationType
{
protected URI value;
+
protected URI namespace;
/**
@@ -33,7 +54,7 @@
* {@link URI }
*
*/
- public URI getValue()
+ public URI getValue()
{
return value;
}
@@ -46,7 +67,7 @@
* {@link URI }
*
*/
- public void setValue(URI value)
+ public void setValue(URI value)
{
this.value = value;
}
@@ -59,7 +80,7 @@
* {@link URI }
*
*/
- public URI getNamespace()
+ public URI getNamespace()
{
return namespace;
}
@@ -72,7 +93,7 @@
* {@link URI }
*
*/
- public void setNamespace(URI value)
+ public void setNamespace(URI value)
{
this.namespace = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AffiliationDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AffiliationDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AffiliationDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -8,7 +29,6 @@
import org.picketlink.identity.xmlsec.w3.xmldsig.SignatureType;
-
/**
* <p>Java class for AffiliationDescriptorType complex type.
*
@@ -34,16 +54,23 @@
* </pre>
*
*
- */
+ */
public class AffiliationDescriptorType extends TypeWithOtherAttributes
{
protected SignatureType signature;
+
protected ExtensionsType extensions;
+
protected List<String> affiliateMember;
+
protected List<KeyDescriptorType> keyDescriptor;
+
protected String affiliationOwnerID;
+
protected XMLGregorianCalendar validUntil;
+
protected Duration cacheDuration;
+
protected String id;
/**
@@ -54,7 +81,8 @@
* {@link SignatureType }
*
*/
- public SignatureType getSignature() {
+ public SignatureType getSignature()
+ {
return signature;
}
@@ -66,7 +94,8 @@
* {@link SignatureType }
*
*/
- public void setSignature(SignatureType value) {
+ public void setSignature(SignatureType value)
+ {
this.signature = value;
}
@@ -78,7 +107,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -90,7 +120,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -116,8 +147,10 @@
*
*
*/
- public List<String> getAffiliateMember() {
- if (affiliateMember == null) {
+ public List<String> getAffiliateMember()
+ {
+ if (affiliateMember == null)
+ {
affiliateMember = new ArrayList<String>();
}
return this.affiliateMember;
@@ -145,8 +178,10 @@
*
*
*/
- public List<KeyDescriptorType> getKeyDescriptor() {
- if (keyDescriptor == null) {
+ public List<KeyDescriptorType> getKeyDescriptor()
+ {
+ if (keyDescriptor == null)
+ {
keyDescriptor = new ArrayList<KeyDescriptorType>();
}
return this.keyDescriptor;
@@ -160,7 +195,8 @@
* {@link String }
*
*/
- public String getAffiliationOwnerID() {
+ public String getAffiliationOwnerID()
+ {
return affiliationOwnerID;
}
@@ -172,7 +208,8 @@
* {@link String }
*
*/
- public void setAffiliationOwnerID(String value) {
+ public void setAffiliationOwnerID(String value)
+ {
this.affiliationOwnerID = value;
}
@@ -184,7 +221,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public XMLGregorianCalendar getValidUntil() {
+ public XMLGregorianCalendar getValidUntil()
+ {
return validUntil;
}
@@ -196,7 +234,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public void setValidUntil(XMLGregorianCalendar value) {
+ public void setValidUntil(XMLGregorianCalendar value)
+ {
this.validUntil = value;
}
@@ -208,7 +247,8 @@
* {@link Duration }
*
*/
- public Duration getCacheDuration() {
+ public Duration getCacheDuration()
+ {
return cacheDuration;
}
@@ -220,7 +260,8 @@
* {@link Duration }
*
*/
- public void setCacheDuration(Duration value) {
+ public void setCacheDuration(Duration value)
+ {
this.cacheDuration = value;
}
@@ -232,7 +273,8 @@
* {@link String }
*
*/
- public String getID() {
+ public String getID()
+ {
return id;
}
@@ -244,7 +286,8 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setID(String value)
+ {
this.id = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeAuthorityDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeAuthorityDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeAuthorityDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -6,7 +27,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
-
/**
* <p>Java class for AttributeAuthorityDescriptorType complex type.
*
@@ -31,15 +51,18 @@
*
*/
-public class AttributeAuthorityDescriptorType
-extends RoleDescriptorType
-{
+public class AttributeAuthorityDescriptorType extends RoleDescriptorType
+{
protected List<EndpointType> attributeService = new ArrayList<EndpointType>();
+
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>();
+
protected List<String> nameIDFormat = new ArrayList<String>();
+
protected List<String> attributeProfile = new ArrayList<String>();
+
protected List<AttributeType> attribute = new ArrayList<AttributeType>();
-
+
public AttributeAuthorityDescriptorType(List<String> protocolSupport)
{
super(protocolSupport);
@@ -49,7 +72,7 @@
* Add an attribute service
* @param endpoint
*/
- public void addAttributeService( EndpointType endpoint )
+ public void addAttributeService(EndpointType endpoint)
{
this.attributeService.add(endpoint);
}
@@ -58,7 +81,7 @@
* Add an assertion id request service
* @param endpoint
*/
- public void addAssertionIDRequestService( EndpointType endpoint )
+ public void addAssertionIDRequestService(EndpointType endpoint)
{
this.assertionIDRequestService.add(endpoint);
}
@@ -67,7 +90,7 @@
* Add a name id
* @param str
*/
- public void addNameIDFormat( String str )
+ public void addNameIDFormat(String str)
{
this.nameIDFormat.add(str);
}
@@ -76,7 +99,7 @@
* Add an attribute profile
* @param str
*/
- public void addAttributeProfile( String str )
+ public void addAttributeProfile(String str)
{
this.attributeProfile.add(str);
}
@@ -85,25 +108,25 @@
* Add an attribute
* @param attribute
*/
- public void addAttribute( AttributeType attribute )
+ public void addAttribute(AttributeType attribute)
{
this.attribute.add(attribute);
}
-
+
/**
* Remove an attribute service
* @param endpoint
*/
- public void removeAttributeService( EndpointType endpoint )
+ public void removeAttributeService(EndpointType endpoint)
{
- this.attributeService.remove( endpoint);
+ this.attributeService.remove(endpoint);
}
/**
* Remove assertion id request service
* @param endpoint
*/
- public void removeAssertionIDRequestService( EndpointType endpoint )
+ public void removeAssertionIDRequestService(EndpointType endpoint)
{
this.assertionIDRequestService.remove(endpoint);
}
@@ -112,7 +135,7 @@
* Remove Name ID
* @param str
*/
- public void removeNameIDFormat( String str )
+ public void removeNameIDFormat(String str)
{
this.nameIDFormat.remove(str);
}
@@ -121,7 +144,7 @@
* Remove attribute profile
* @param str
*/
- public void removeAttributeProfile( String str )
+ public void removeAttributeProfile(String str)
{
this.attributeProfile.remove(str);
}
@@ -130,7 +153,7 @@
* Remove attribute
* @param attribute
*/
- public void removeAttribute( AttributeType attribute )
+ public void removeAttribute(AttributeType attribute)
{
this.attribute.remove(attribute);
}
@@ -143,9 +166,9 @@
*
*
*/
- public List<EndpointType> getAttributeService()
- {
- return Collections.unmodifiableList( this.attributeService );
+ public List<EndpointType> getAttributeService()
+ {
+ return Collections.unmodifiableList(this.attributeService);
}
/**
@@ -157,9 +180,9 @@
*
*
*/
- public List<EndpointType> getAssertionIDRequestService()
+ public List<EndpointType> getAssertionIDRequestService()
{
- return Collections.unmodifiableList( this.assertionIDRequestService );
+ return Collections.unmodifiableList(this.assertionIDRequestService);
}
/**
@@ -168,9 +191,9 @@
* Objects of the following type(s) are allowed in the list
* {@link String }
*/
- public List<String> getNameIDFormat()
- {
- return Collections.unmodifiableList( this.nameIDFormat );
+ public List<String> getNameIDFormat()
+ {
+ return Collections.unmodifiableList(this.nameIDFormat);
}
/**
@@ -181,9 +204,9 @@
*
*
*/
- public List<String> getAttributeProfile()
+ public List<String> getAttributeProfile()
{
- return Collections.unmodifiableList( this.attributeProfile );
+ return Collections.unmodifiableList(this.attributeProfile);
}
/**
@@ -194,8 +217,8 @@
*
*
*/
- public List<AttributeType> getAttribute()
- {
- return Collections.unmodifiableList( this.attribute );
+ public List<AttributeType> getAttribute()
+ {
+ return Collections.unmodifiableList(this.attribute);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeConsumingServiceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeConsumingServiceType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AttributeConsumingServiceType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for AttributeConsumingServiceType complex type.
*
@@ -27,8 +47,8 @@
* </pre>
*
*
- */
-public class AttributeConsumingServiceType
+ */
+public class AttributeConsumingServiceType
{
protected List<LocalizedNameType> serviceName = new ArrayList<LocalizedNameType>();
@@ -40,10 +60,8 @@
protected Boolean isDefault;
-
-
public AttributeConsumingServiceType(int index)
- {
+ {
this.index = index;
}
@@ -55,9 +73,9 @@
*
*
*/
- public void addServiceName( LocalizedNameType service )
+ public void addServiceName(LocalizedNameType service)
{
- this.serviceName.add(service) ;
+ this.serviceName.add(service);
}
/**
@@ -68,7 +86,7 @@
*
*
*/
- public void addServiceDescription( LocalizedNameType desc )
+ public void addServiceDescription(LocalizedNameType desc)
{
this.serviceDescription.add(desc);
}
@@ -80,11 +98,11 @@
* {@link RequestedAttributeType }
*
*/
- public void addRequestedAttribute( RequestedAttributeType req )
+ public void addRequestedAttribute(RequestedAttributeType req)
{
this.requestedAttribute.add(req);
}
-
+
/**
* remove serviceName
* <p>
@@ -93,9 +111,9 @@
*
*
*/
- public void removeServiceName( LocalizedNameType service )
+ public void removeServiceName(LocalizedNameType service)
{
- this.serviceName.remove(service) ;
+ this.serviceName.remove(service);
}
/**
@@ -106,7 +124,7 @@
*
*
*/
- public void removeServiceDescription( LocalizedNameType desc )
+ public void removeServiceDescription(LocalizedNameType desc)
{
this.serviceDescription.remove(desc);
}
@@ -118,12 +136,11 @@
* {@link RequestedAttributeType }
*
*/
- public void removeRequestedAttribute( RequestedAttributeType req )
+ public void removeRequestedAttribute(RequestedAttributeType req)
{
this.requestedAttribute.remove(req);
}
-
-
+
/**
* Gets the value of the serviceName property.
* <p>
@@ -132,9 +149,9 @@
*
*
*/
- public List<LocalizedNameType> getServiceName()
+ public List<LocalizedNameType> getServiceName()
{
- return Collections.unmodifiableList( this.serviceName );
+ return Collections.unmodifiableList(this.serviceName);
}
/**
@@ -145,9 +162,9 @@
*
*
*/
- public List<LocalizedNameType> getServiceDescription()
+ public List<LocalizedNameType> getServiceDescription()
{
- return Collections.unmodifiableList( this.serviceDescription );
+ return Collections.unmodifiableList(this.serviceDescription);
}
/**
@@ -158,16 +175,16 @@
*
*
*/
- public List<RequestedAttributeType> getRequestedAttribute()
+ public List<RequestedAttributeType> getRequestedAttribute()
{
- return Collections.unmodifiableList( this.requestedAttribute );
+ return Collections.unmodifiableList(this.requestedAttribute);
}
/**
* Gets the value of the index property.
*
*/
- public int getIndex()
+ public int getIndex()
{
return index;
}
@@ -180,7 +197,7 @@
* {@link Boolean }
*
*/
- public Boolean isIsDefault()
+ public Boolean isIsDefault()
{
return isDefault;
}
@@ -193,7 +210,7 @@
* {@link Boolean }
*
*/
- public void setIsDefault(Boolean value)
+ public void setIsDefault(Boolean value)
{
this.isDefault = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AuthnAuthorityDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AuthnAuthorityDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/AuthnAuthorityDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for AuthnAuthorityDescriptorType complex type.
*
@@ -24,23 +44,24 @@
* </complexType>
* </pre>
*/
-public class AuthnAuthorityDescriptorType
-extends RoleDescriptorType
+public class AuthnAuthorityDescriptorType extends RoleDescriptorType
{
- protected List<EndpointType> authnQueryService = new ArrayList<EndpointType>();
+ protected List<EndpointType> authnQueryService = new ArrayList<EndpointType>();
+
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>();
+
protected List<String> nameIDFormat = new ArrayList<String>();
-
+
public AuthnAuthorityDescriptorType(List<String> protocolSupport)
{
- super(protocolSupport);
+ super(protocolSupport);
}
/**
* Add authn query service
* @param endpoint
*/
- public void addAuthnQueryService( EndpointType endpoint )
+ public void addAuthnQueryService(EndpointType endpoint)
{
this.authnQueryService.add(endpoint);
}
@@ -49,7 +70,7 @@
* Add assertion id request service
* @param endpoint
*/
- public void addAssertionIDRequestService( EndpointType endpoint )
+ public void addAssertionIDRequestService(EndpointType endpoint)
{
this.assertionIDRequestService.add(endpoint);
}
@@ -58,16 +79,16 @@
* Add name id format
* @param str
*/
- public void addNameIDFormat( String str )
+ public void addNameIDFormat(String str)
{
this.nameIDFormat.add(str);
}
-
+
/**
* Remove authn query service
* @param endpoint
*/
- public void removeAuthnQueryService( EndpointType endpoint )
+ public void removeAuthnQueryService(EndpointType endpoint)
{
this.authnQueryService.remove(endpoint);
}
@@ -76,7 +97,7 @@
* remove assertion id request service
* @param endpoint
*/
- public void removeAssertionIDRequestService( EndpointType endpoint )
+ public void removeAssertionIDRequestService(EndpointType endpoint)
{
this.assertionIDRequestService.remove(endpoint);
}
@@ -85,7 +106,7 @@
* remove name id format
* @param str
*/
- public void removeNameIDFormat( String str )
+ public void removeNameIDFormat(String str)
{
this.nameIDFormat.remove(str);
}
@@ -98,9 +119,9 @@
*
*
*/
- public List<EndpointType> getAuthnQueryService()
+ public List<EndpointType> getAuthnQueryService()
{
- return Collections.unmodifiableList( this.authnQueryService );
+ return Collections.unmodifiableList(this.authnQueryService);
}
/**
@@ -111,9 +132,9 @@
*
*
*/
- public List<EndpointType> getAssertionIDRequestService()
+ public List<EndpointType> getAssertionIDRequestService()
{
- return Collections.unmodifiableList( this.assertionIDRequestService );
+ return Collections.unmodifiableList(this.assertionIDRequestService);
}
/**
@@ -124,8 +145,8 @@
*
*
*/
- public List<String> getNameIDFormat()
+ public List<String> getNameIDFormat()
{
- return Collections.unmodifiableList( this.nameIDFormat );
+ return Collections.unmodifiableList(this.nameIDFormat);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for ContactType complex type.
*
@@ -29,21 +49,25 @@
* </pre>
*
*
- */
+ */
public class ContactType extends TypeWithOtherAttributes
{
protected ExtensionsType extensions;
+
protected String company;
+
protected String givenName;
+
protected String surName;
+
protected List<String> emailAddress = new ArrayList<String>();
+
protected List<String> telephoneNumber = new ArrayList<String>();
- protected ContactTypeType contactType;
+ protected ContactTypeType contactType;
-
public ContactType(ContactTypeType contactType)
- {
+ {
this.contactType = contactType;
}
@@ -55,7 +79,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -67,7 +92,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -79,7 +105,8 @@
* {@link String }
*
*/
- public String getCompany() {
+ public String getCompany()
+ {
return company;
}
@@ -91,7 +118,8 @@
* {@link String }
*
*/
- public void setCompany(String value) {
+ public void setCompany(String value)
+ {
this.company = value;
}
@@ -103,7 +131,8 @@
* {@link String }
*
*/
- public String getGivenName() {
+ public String getGivenName()
+ {
return givenName;
}
@@ -115,7 +144,8 @@
* {@link String }
*
*/
- public void setGivenName(String value) {
+ public void setGivenName(String value)
+ {
this.givenName = value;
}
@@ -127,7 +157,8 @@
* {@link String }
*
*/
- public String getSurName() {
+ public String getSurName()
+ {
return surName;
}
@@ -139,7 +170,8 @@
* {@link String }
*
*/
- public void setSurName(String value) {
+ public void setSurName(String value)
+ {
this.surName = value;
}
@@ -147,7 +179,7 @@
* Add an email address
* @param email
*/
- public void addEmailAddress( String email )
+ public void addEmailAddress(String email)
{
this.emailAddress.add(email);
}
@@ -156,16 +188,16 @@
* remove a telephone
* @param tel
*/
- public void removeTelephone( String tel )
+ public void removeTelephone(String tel)
{
this.telephoneNumber.remove(tel);
}
-
+
/**
* remove an email address
* @param email
*/
- public void removeEmailAddress( String email )
+ public void removeEmailAddress(String email)
{
this.emailAddress.remove(email);
}
@@ -174,7 +206,7 @@
* Add a telephone
* @param tel
*/
- public void addTelephone( String tel )
+ public void addTelephone(String tel)
{
this.telephoneNumber.add(tel);
}
@@ -187,9 +219,9 @@
*
*
*/
- public List<String> getEmailAddress()
+ public List<String> getEmailAddress()
{
- return Collections.unmodifiableList( this.emailAddress );
+ return Collections.unmodifiableList(this.emailAddress);
}
/**
@@ -200,9 +232,9 @@
*
*
*/
- public List<String> getTelephoneNumber()
+ public List<String> getTelephoneNumber()
{
- return Collections.unmodifiableList( this.telephoneNumber );
+ return Collections.unmodifiableList(this.telephoneNumber);
}
/**
@@ -213,7 +245,8 @@
* {@link ContactTypeType }
*
*/
- public ContactTypeType getContactType() {
+ public ContactTypeType getContactType()
+ {
return contactType;
}
@@ -225,7 +258,8 @@
* {@link ContactTypeType }
*
*/
- public void setContactType(ContactTypeType value) {
+ public void setContactType(ContactTypeType value)
+ {
this.contactType = value;
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactTypeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactTypeType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ContactTypeType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,7 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
-
-
/**
* <p>Java class for ContactTypeType.
*
@@ -19,27 +38,27 @@
* </simpleType>
* </pre>
*
- */
-public enum ContactTypeType
-{
- TECHNICAL("technical"),
- SUPPORT("support"),
- ADMINISTRATIVE("administrative"),
- BILLING("billing"),
- OTHER("other");
+ */
+public enum ContactTypeType {
+ TECHNICAL("technical"), SUPPORT("support"), ADMINISTRATIVE("administrative"), BILLING("billing"), OTHER("other");
private final String value;
- ContactTypeType(String v) {
+ ContactTypeType(String v)
+ {
value = v;
}
- public String value() {
+ public String value()
+ {
return value;
}
- public static ContactTypeType fromValue(String v) {
- for (ContactTypeType c: ContactTypeType.values()) {
- if (c.value.equals(v)) {
+ public static ContactTypeType fromValue(String v)
+ {
+ for (ContactTypeType c : ContactTypeType.values())
+ {
+ if (c.value.equals(v))
+ {
return c;
}
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EndpointType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EndpointType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EndpointType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.net.URI;
@@ -7,7 +28,6 @@
import org.w3c.dom.Element;
-
/**
* <p>Java class for EndpointType complex type.
*
@@ -30,36 +50,37 @@
*
*
*/
-public class EndpointType extends TypeWithOtherAttributes
+public class EndpointType extends TypeWithOtherAttributes
{
- protected List<Object> any = new ArrayList<Object> ();
+ protected List<Object> any = new ArrayList<Object>();
protected URI binding;
+
protected URI location;
- protected URI responseLocation;
+ protected URI responseLocation;
public EndpointType(URI binding, URI location)
- {
+ {
this.binding = binding;
this.location = location;
}
-
+
/**
* Add an object
* @param obj
*/
- public void addObject( Object obj )
+ public void addObject(Object obj)
{
this.any.add(obj);
}
-
+
/**
* remove an object
* @param obj
*/
- public void removeObject( Object obj )
+ public void removeObject(Object obj)
{
this.any.remove(obj);
}
@@ -73,9 +94,9 @@
*
*
*/
- public List<Object> getAny()
+ public List<Object> getAny()
{
- return Collections.unmodifiableList( this.any );
+ return Collections.unmodifiableList(this.any);
}
/**
@@ -86,7 +107,7 @@
* {@link URI }
*
*/
- public URI getBinding()
+ public URI getBinding()
{
return binding;
}
@@ -99,7 +120,7 @@
* {@link URI }
*
*/
- public URI getLocation()
+ public URI getLocation()
{
return location;
}
@@ -112,7 +133,8 @@
* {@link URI }
*
*/
- public URI getResponseLocation() {
+ public URI getResponseLocation()
+ {
return responseLocation;
}
@@ -124,8 +146,8 @@
* {@link URI }
*
*/
- public void setResponseLocation(URI value)
+ public void setResponseLocation(URI value)
{
this.responseLocation = value;
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntitiesDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntitiesDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntitiesDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -9,7 +30,6 @@
import org.w3c.dom.Element;
-
/**
* <p>Java class for EntitiesDescriptorType complex type.
*
@@ -37,16 +57,21 @@
* </pre>
*
*
- */
-public class EntitiesDescriptorType
+ */
+public class EntitiesDescriptorType
{
protected Element signature;
+
protected ExtensionsType extensions;
+
protected List<Object> entityDescriptor = new ArrayList<Object>();
protected XMLGregorianCalendar validUntil;
+
protected Duration cacheDuration;
+
protected String id;
+
protected String name;
/**
@@ -57,7 +82,7 @@
* {@link Element }
*
*/
- public Element getSignature()
+ public Element getSignature()
{
return signature;
}
@@ -70,7 +95,7 @@
* {@link Element }
*
*/
- public void setSignature(Element value)
+ public void setSignature(Element value)
{
this.signature = value;
}
@@ -83,7 +108,7 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions()
+ public ExtensionsType getExtensions()
{
return extensions;
}
@@ -96,7 +121,7 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value)
+ public void setExtensions(ExtensionsType value)
{
this.extensions = value;
}
@@ -105,20 +130,20 @@
* Add an entity descriptor
* @param obj
*/
- public void addEntityDescriptor( Object obj )
+ public void addEntityDescriptor(Object obj)
{
- this.entityDescriptor.add( obj );
+ this.entityDescriptor.add(obj);
}
-
+
/**
* Remove an entity descriptor
* @param obj
*/
- public void removeEntityDescriptor( Object obj )
+ public void removeEntityDescriptor(Object obj)
{
- this.entityDescriptor.remove( obj );
+ this.entityDescriptor.remove(obj);
}
-
+
/**
* Gets the value of the entityDescriptorOrEntitiesDescriptor property.
* <p>
@@ -128,9 +153,9 @@
*
*
*/
- public List<Object> getEntityDescriptor()
+ public List<Object> getEntityDescriptor()
{
- return Collections.unmodifiableList( this.entityDescriptor );
+ return Collections.unmodifiableList(this.entityDescriptor);
}
/**
@@ -141,7 +166,7 @@
* {@link XMLGregorianCalendar }
*
*/
- public XMLGregorianCalendar getValidUntil()
+ public XMLGregorianCalendar getValidUntil()
{
return validUntil;
}
@@ -154,7 +179,7 @@
* {@link XMLGregorianCalendar }
*
*/
- public void setValidUntil(XMLGregorianCalendar value)
+ public void setValidUntil(XMLGregorianCalendar value)
{
this.validUntil = value;
}
@@ -167,7 +192,8 @@
* {@link Duration }
*
*/
- public Duration getCacheDuration() {
+ public Duration getCacheDuration()
+ {
return cacheDuration;
}
@@ -179,7 +205,8 @@
* {@link Duration }
*
*/
- public void setCacheDuration(Duration value) {
+ public void setCacheDuration(Duration value)
+ {
this.cacheDuration = value;
}
@@ -191,7 +218,8 @@
* {@link String }
*
*/
- public String getID() {
+ public String getID()
+ {
return id;
}
@@ -203,7 +231,8 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setID(String value)
+ {
this.id = value;
}
@@ -215,7 +244,7 @@
* {@link String }
*
*/
- public String getName()
+ public String getName()
{
return name;
}
@@ -228,7 +257,7 @@
* {@link String }
*
*/
- public void setName(String value)
+ public void setName(String value)
{
this.name = value;
}
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-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/EntityDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -9,7 +30,6 @@
import org.w3c.dom.Element;
-
/**
* <p>Java class for EntityDescriptorType complex type.
*
@@ -53,100 +73,114 @@
public static class EDTChoiceType
{
private List<EDTDescriptorChoiceType> descriptors = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>();
+
private AffiliationDescriptorType affiliationDescriptor;
public EDTChoiceType(List<EDTDescriptorChoiceType> descriptors)
{
this.descriptors = descriptors;
}
+
public EDTChoiceType(AffiliationDescriptorType affiliationDescriptor)
- {
+ {
this.affiliationDescriptor = affiliationDescriptor;
}
+
public List<EDTDescriptorChoiceType> getDescriptors()
{
- return Collections.unmodifiableList( descriptors );
+ return Collections.unmodifiableList(descriptors);
}
+
public AffiliationDescriptorType getAffiliationDescriptor()
{
return affiliationDescriptor;
- }
-
- public static EDTChoiceType oneValue( EDTDescriptorChoiceType edt )
+ }
+
+ public static EDTChoiceType oneValue(EDTDescriptorChoiceType edt)
{
List<EDTDescriptorChoiceType> aList = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>();
aList.add(edt);
- return new EDTChoiceType( aList );
+ return new EDTChoiceType(aList);
}
}
public static class EDTDescriptorChoiceType
{
private RoleDescriptorType roleDescriptor;
+
private IDPSSODescriptorType idpDescriptor;
+
private SPSSODescriptorType spDescriptor;
+
private AuthnAuthorityDescriptorType authnDescriptor;
+
private AttributeAuthorityDescriptorType attribDescriptor;
+
private PDPDescriptorType pdpDescriptor;
-
+
public EDTDescriptorChoiceType(AuthnAuthorityDescriptorType authnDescriptor)
{
this.authnDescriptor = authnDescriptor;
}
-
+
public EDTDescriptorChoiceType(AttributeAuthorityDescriptorType attribDescriptor)
{
this.attribDescriptor = attribDescriptor;
}
-
+
public EDTDescriptorChoiceType(PDPDescriptorType pdpDescriptor)
{
this.pdpDescriptor = pdpDescriptor;
}
-
- public EDTDescriptorChoiceType( SSODescriptorType sso )
+
+ public EDTDescriptorChoiceType(SSODescriptorType sso)
{
- if(sso instanceof IDPSSODescriptorType )
+ if (sso instanceof IDPSSODescriptorType)
{
this.idpDescriptor = (IDPSSODescriptorType) sso;
}
else
this.spDescriptor = (SPSSODescriptorType) sso;
}
-
+
public EDTDescriptorChoiceType(RoleDescriptorType roleDescriptor)
- {
- this.roleDescriptor = roleDescriptor;
+ {
+ this.roleDescriptor = roleDescriptor;
}
-
-
+
public RoleDescriptorType getRoleDescriptor()
{
return roleDescriptor;
}
+
public IDPSSODescriptorType getIdpDescriptor()
{
return idpDescriptor;
}
+
public SPSSODescriptorType getSpDescriptor()
{
return spDescriptor;
}
+
public AuthnAuthorityDescriptorType getAuthnDescriptor()
{
return authnDescriptor;
}
+
public AttributeAuthorityDescriptorType getAttribDescriptor()
{
return attribDescriptor;
}
+
public PDPDescriptorType getPdpDescriptor()
{
return pdpDescriptor;
- }
+ }
}
protected Element signature;
+
protected ExtensionsType extensions;
protected List<EDTChoiceType> choiceType = new ArrayList<EntityDescriptorType.EDTChoiceType>();
@@ -165,7 +199,7 @@
protected String id;
- public EntityDescriptorType( String entityID )
+ public EntityDescriptorType(String entityID)
{
this.entityID = entityID;
}
@@ -178,7 +212,8 @@
* {@link Element }
*
*/
- public Element getSignature() {
+ public Element getSignature()
+ {
return signature;
}
@@ -190,7 +225,8 @@
* {@link Element }
*
*/
- public void setSignature( Element value) {
+ public void setSignature(Element value)
+ {
this.signature = value;
}
@@ -202,7 +238,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -214,7 +251,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -224,7 +262,7 @@
*/
public List<EDTChoiceType> getChoiceType()
{
- return Collections.unmodifiableList( choiceType );
+ return Collections.unmodifiableList(choiceType);
}
/**
@@ -233,16 +271,16 @@
*/
public void addChoiceType(EDTChoiceType choiceType)
{
- this.choiceType.add( choiceType );
+ this.choiceType.add(choiceType);
}
-
+
/**
* Remove a choice type
* @param choiceType
*/
public void removeChoiceType(EDTChoiceType choiceType)
{
- this.choiceType.remove( choiceType );
+ this.choiceType.remove(choiceType);
}
/**
@@ -253,7 +291,8 @@
* {@link OrganizationType }
*
*/
- public OrganizationType getOrganization() {
+ public OrganizationType getOrganization()
+ {
return organization;
}
@@ -265,7 +304,8 @@
* {@link OrganizationType }
*
*/
- public void setOrganization(OrganizationType value) {
+ public void setOrganization(OrganizationType value)
+ {
this.organization = value;
}
@@ -273,16 +313,16 @@
* Add a {@link ContactType} contact person
* @param ct
*/
- public void addContactPerson( ContactType ct )
+ public void addContactPerson(ContactType ct)
{
contactPerson.add(ct);
}
-
- public void removeContactPerson( ContactType ct )
+
+ public void removeContactPerson(ContactType ct)
{
contactPerson.remove(ct);
}
-
+
/**
* Gets the value of the contactPerson property.
* <p>
@@ -291,9 +331,9 @@
*
*
*/
- public List<ContactType> getContactPerson()
+ public List<ContactType> getContactPerson()
{
- return Collections.unmodifiableList( this.contactPerson );
+ return Collections.unmodifiableList(this.contactPerson);
}
/**
@@ -318,9 +358,9 @@
*
*
*/
- public List<AdditionalMetadataLocationType> getAdditionalMetadataLocation()
+ public List<AdditionalMetadataLocationType> getAdditionalMetadataLocation()
{
- return Collections.unmodifiableList( this.additionalMetadataLocation );
+ return Collections.unmodifiableList(this.additionalMetadataLocation);
}
/**
@@ -331,7 +371,8 @@
* {@link String }
*
*/
- public String getEntityID() {
+ public String getEntityID()
+ {
return entityID;
}
@@ -343,7 +384,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public XMLGregorianCalendar getValidUntil() {
+ public XMLGregorianCalendar getValidUntil()
+ {
return validUntil;
}
@@ -355,7 +397,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public void setValidUntil(XMLGregorianCalendar value) {
+ public void setValidUntil(XMLGregorianCalendar value)
+ {
this.validUntil = value;
}
@@ -367,7 +410,8 @@
* {@link Duration }
*
*/
- public Duration getCacheDuration() {
+ public Duration getCacheDuration()
+ {
return cacheDuration;
}
@@ -379,7 +423,8 @@
* {@link Duration }
*
*/
- public void setCacheDuration(Duration value) {
+ public void setCacheDuration(Duration value)
+ {
this.cacheDuration = value;
}
@@ -391,7 +436,8 @@
* {@link String }
*
*/
- public String getID() {
+ public String getID()
+ {
return id;
}
@@ -403,7 +449,8 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setID(String value)
+ {
this.id = value;
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/ExtensionsType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -6,7 +27,6 @@
import org.w3c.dom.Element;
-
/**
* <p>Java class for ExtensionsType complex type.
*
@@ -26,7 +46,7 @@
*
*
*/
-public class ExtensionsType
+public class ExtensionsType
{
protected List<Object> any = new ArrayList<Object>();
@@ -34,16 +54,16 @@
* Add an object
* @param obj
*/
- public void addObject( Object obj )
+ public void addObject(Object obj)
{
this.any.add(obj);
}
-
+
/**
* Remove an object
* @param obj
*/
- public void removeObject( Object obj )
+ public void removeObject(Object obj)
{
this.any.remove(obj);
}
@@ -57,8 +77,8 @@
*
*
*/
- public List<Object> getAny()
+ public List<Object> getAny()
{
- return Collections.unmodifiableList( this.any );
- }
+ return Collections.unmodifiableList(this.any);
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IDPSSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IDPSSODescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IDPSSODescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -6,7 +27,6 @@
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
-
/**
* <p>Java class for IDPSSODescriptorType complex type.
*
@@ -31,31 +51,30 @@
*
*
*/
-public class IDPSSODescriptorType
-extends SSODescriptorType
-{
+public class IDPSSODescriptorType extends SSODescriptorType
+{
protected List<EndpointType> singleSignOnService = new ArrayList<EndpointType>();
- protected List<EndpointType> nameIDMappingService= new ArrayList<EndpointType>();
+ protected List<EndpointType> nameIDMappingService = new ArrayList<EndpointType>();
- protected List<EndpointType> assertionIDRequestService= new ArrayList<EndpointType>();
+ protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>();
protected List<String> attributeProfile = new ArrayList<String>();
protected List<AttributeType> attribute = new ArrayList<AttributeType>();
- protected Boolean wantAuthnRequestsSigned;
+ protected Boolean wantAuthnRequestsSigned;
public IDPSSODescriptorType(List<String> protocolSupport)
{
- super(protocolSupport);
+ super(protocolSupport);
}
/**
* Add a SSO service
* @param endpt
*/
- public void addSingleSignOnService( EndpointType endpt)
+ public void addSingleSignOnService(EndpointType endpt)
{
this.singleSignOnService.add(endpt);
}
@@ -64,7 +83,7 @@
* Add name id mapping service
* @param endpt
*/
- public void addNameIDMappingService( EndpointType endpt )
+ public void addNameIDMappingService(EndpointType endpt)
{
this.nameIDMappingService.add(endpt);
}
@@ -73,7 +92,7 @@
* Add assertion id request service
* @param endpt
*/
- public void addAssertionIDRequestService( EndpointType endpt )
+ public void addAssertionIDRequestService(EndpointType endpt)
{
this.assertionIDRequestService.add(endpt);
}
@@ -82,26 +101,25 @@
* Add attribute profile
* @param str
*/
- public void addAttributeProfile( String str )
+ public void addAttributeProfile(String str)
{
- this.attributeProfile.add( str );
- }
+ this.attributeProfile.add(str);
+ }
/**
* Add attribute
* @param att
*/
- public void addAttribute( AttributeType att )
+ public void addAttribute(AttributeType att)
{
this.attribute.add(att);
- }
-
-
+ }
+
/**
* Remove a SSO service
* @param endpt
*/
- public void removeSingleSignOnService( EndpointType endpt)
+ public void removeSingleSignOnService(EndpointType endpt)
{
this.singleSignOnService.remove(endpt);
}
@@ -110,7 +128,7 @@
* remove name id mapping service
* @param endpt
*/
- public void removeNameIDMappingService( EndpointType endpt )
+ public void removeNameIDMappingService(EndpointType endpt)
{
this.nameIDMappingService.remove(endpt);
}
@@ -119,7 +137,7 @@
* remove assertion id request service
* @param endpt
*/
- public void removeAssertionIDRequestService( EndpointType endpt )
+ public void removeAssertionIDRequestService(EndpointType endpt)
{
this.assertionIDRequestService.remove(endpt);
}
@@ -128,19 +146,19 @@
* Add attribute profile
* @param str
*/
- public void removeAttributeProfile( String str )
+ public void removeAttributeProfile(String str)
{
- this.attributeProfile.remove( str );
- }
+ this.attributeProfile.remove(str);
+ }
/**
* Add attribute
* @param att
*/
- public void removeAttribute( AttributeType att )
+ public void removeAttribute(AttributeType att)
{
this.attribute.remove(att);
- }
+ }
/**
* Gets the value of the singleSignOnService property.
@@ -148,9 +166,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getSingleSignOnService()
+ public List<EndpointType> getSingleSignOnService()
{
- return Collections.unmodifiableList( this.singleSignOnService );
+ return Collections.unmodifiableList(this.singleSignOnService);
}
/**
@@ -160,9 +178,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getNameIDMappingService()
+ public List<EndpointType> getNameIDMappingService()
{
- return Collections.unmodifiableList( this.nameIDMappingService );
+ return Collections.unmodifiableList(this.nameIDMappingService);
}
/**
@@ -171,9 +189,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getAssertionIDRequestService()
+ public List<EndpointType> getAssertionIDRequestService()
{
- return Collections.unmodifiableList( this.assertionIDRequestService );
+ return Collections.unmodifiableList(this.assertionIDRequestService);
}
/**
@@ -190,9 +208,9 @@
* Objects of the following type(s) are allowed in the list
* {@link String }
*/
- public List<String> getAttributeProfile()
+ public List<String> getAttributeProfile()
{
- return Collections.unmodifiableList( this.attributeProfile );
+ return Collections.unmodifiableList(this.attributeProfile);
}
/**
@@ -204,9 +222,9 @@
*
*
*/
- public List<AttributeType> getAttribute()
- {
- return Collections.unmodifiableList( this.attribute );
+ public List<AttributeType> getAttribute()
+ {
+ return Collections.unmodifiableList(this.attribute);
}
/**
@@ -217,7 +235,7 @@
* {@link Boolean }
*
*/
- public Boolean isWantAuthnRequestsSigned()
+ public Boolean isWantAuthnRequestsSigned()
{
return wantAuthnRequestsSigned;
}
@@ -230,7 +248,7 @@
* {@link Boolean }
*
*/
- public void setWantAuthnRequestsSigned(Boolean value)
+ public void setWantAuthnRequestsSigned(Boolean value)
{
this.wantAuthnRequestsSigned = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IndexedEndpointType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IndexedEndpointType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/IndexedEndpointType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.net.URI;
@@ -2,4 +23,2 @@
-
-
/**
@@ -21,12 +40,12 @@
* </pre>
*
*
- */
-public class IndexedEndpointType
-extends EndpointType
+ */
+public class IndexedEndpointType extends EndpointType
{
- protected int index;
+ protected int index;
+
protected Boolean isDefault;
public IndexedEndpointType(URI binding, URI location)
@@ -38,7 +57,8 @@
* Gets the value of the index property.
*
*/
- public int getIndex() {
+ public int getIndex()
+ {
return index;
}
@@ -46,7 +66,8 @@
* Sets the value of the index property.
*
*/
- public void setIndex(int value) {
+ public void setIndex(int value)
+ {
this.index = value;
}
@@ -58,7 +79,8 @@
* {@link Boolean }
*
*/
- public Boolean isIsDefault() {
+ public Boolean isIsDefault()
+ {
return isDefault;
}
@@ -70,7 +92,8 @@
* {@link Boolean }
*
*/
- public void setIsDefault(Boolean value) {
+ public void setIsDefault(Boolean value)
+ {
this.isDefault = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -9,7 +29,6 @@
import org.picketlink.identity.xmlsec.w3.xmlenc.EncryptionMethodType;
import org.w3c.dom.Element;
-
/**
* <p>Java class for KeyDescriptorType complex type.
*
@@ -30,10 +49,11 @@
* </pre>
*
*
- */
-public class KeyDescriptorType
+ */
+public class KeyDescriptorType
{
protected Element keyInfo;
+
protected List<EncryptionMethodType> encryptionMethod = new ArrayList<EncryptionMethodType>();
protected KeyTypes use;
@@ -46,7 +66,8 @@
* {@link KeyInfoType }
*
*/
- public Element getKeyInfo() {
+ public Element getKeyInfo()
+ {
return keyInfo;
}
@@ -58,7 +79,8 @@
* {@link KeyInfoType }
*
*/
- public void setKeyInfo( Element value) {
+ public void setKeyInfo(Element value)
+ {
this.keyInfo = value;
}
@@ -66,18 +88,18 @@
* Add encryption method type
* @param e
*/
- public void addEncryptionMethod( EncryptionMethodType e )
+ public void addEncryptionMethod(EncryptionMethodType e)
{
- this.encryptionMethod.add( e );
+ this.encryptionMethod.add(e);
}
-
+
/**
* Remove encryption method type
* @param e
*/
- public void removeEncryptionMethod( EncryptionMethodType e )
+ public void removeEncryptionMethod(EncryptionMethodType e)
{
- this.encryptionMethod.remove( e );
+ this.encryptionMethod.remove(e);
}
/**
@@ -88,9 +110,9 @@
*
*
*/
- public List<EncryptionMethodType> getEncryptionMethod()
+ public List<EncryptionMethodType> getEncryptionMethod()
{
- return Collections.unmodifiableList( this.encryptionMethod );
+ return Collections.unmodifiableList(this.encryptionMethod);
}
/**
@@ -101,7 +123,8 @@
* {@link KeyTypes }
*
*/
- public KeyTypes getUse() {
+ public KeyTypes getUse()
+ {
return use;
}
@@ -113,7 +136,8 @@
* {@link KeyTypes }
*
*/
- public void setUse(KeyTypes value) {
+ public void setUse(KeyTypes value)
+ {
this.use = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyTypes.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyTypes.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/KeyTypes.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,7 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
-
-
/**
* <p>Java class for KeyTypes.
*
@@ -17,23 +36,26 @@
* </pre>
*
*/
-public enum KeyTypes
-{
- ENCRYPTION("encryption"),
- SIGNING("signing");
+public enum KeyTypes {
+ ENCRYPTION("encryption"), SIGNING("signing");
private final String value;
- KeyTypes(String v) {
+ KeyTypes(String v)
+ {
value = v;
}
- public String value() {
+ public String value()
+ {
return value;
}
- public static KeyTypes fromValue(String v) {
- for (KeyTypes c: KeyTypes.values()) {
- if (c.value.equals(v)) {
+ public static KeyTypes fromValue(String v)
+ {
+ for (KeyTypes c : KeyTypes.values())
+ {
+ if (c.value.equals(v))
+ {
return c;
}
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedNameType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedNameType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedNameType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,7 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
-
-
/**
* <p>Java class for localizedNameType complex type.
*
@@ -19,14 +38,14 @@
*
*
*/
-public class LocalizedNameType
+public class LocalizedNameType
{
protected String value;
+
protected String lang;
-
public LocalizedNameType(String lang)
- {
+ {
this.lang = lang;
}
@@ -38,7 +57,8 @@
* {@link String }
*
*/
- public String getValue() {
+ public String getValue()
+ {
return value;
}
@@ -50,7 +70,8 @@
* {@link String }
*
*/
- public void setValue(String value) {
+ public void setValue(String value)
+ {
this.value = value;
}
@@ -62,7 +83,8 @@
* {@link String }
*
*/
- public String getLang() {
+ public String getLang()
+ {
return lang;
- }
+ }
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedURIType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedURIType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/LocalizedURIType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.net.URI;
@@ -2,3 +23,2 @@
-
/**
@@ -19,15 +39,16 @@
* </pre>
*
*
- */
-public class LocalizedURIType
+ */
+public class LocalizedURIType
{
- protected URI value;
+ protected URI value;
+
protected String lang;
public LocalizedURIType(String lang)
- {
+ {
this.lang = lang;
}
@@ -39,7 +60,8 @@
* {@link String }
*
*/
- public URI getValue() {
+ public URI getValue()
+ {
return value;
}
@@ -51,7 +73,8 @@
* {@link String }
*
*/
- public void setValue( URI value) {
+ public void setValue(URI value)
+ {
this.value = value;
}
@@ -63,7 +86,8 @@
* {@link String }
*
*/
- public String getLang() {
+ public String getLang()
+ {
return lang;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/OrganizationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/OrganizationType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/OrganizationType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for OrganizationType complex type.
*
@@ -32,6 +52,7 @@
{
protected ExtensionsType extensions;
+
protected List<LocalizedNameType> organizationName = new ArrayList<LocalizedNameType>();
protected List<LocalizedNameType> organizationDisplayName = new ArrayList<LocalizedNameType>();
@@ -42,7 +63,7 @@
* Add an organization name
* @param name
*/
- public void addOrganizationName( LocalizedNameType name )
+ public void addOrganizationName(LocalizedNameType name)
{
this.organizationName.add(name);
}
@@ -51,7 +72,7 @@
* Add organization display name
* @param name
*/
- public void addOrganizationDisplayName( LocalizedNameType name )
+ public void addOrganizationDisplayName(LocalizedNameType name)
{
this.organizationDisplayName.add(name);
}
@@ -60,16 +81,16 @@
* Add organization url
* @param uri
*/
- public void addOrganizationURL( LocalizedURIType uri )
+ public void addOrganizationURL(LocalizedURIType uri)
{
this.organizationURL.add(uri);
}
-
+
/**
* remove an organization name
* @param name
*/
- public void removeOrganizationName( LocalizedNameType name )
+ public void removeOrganizationName(LocalizedNameType name)
{
this.organizationName.remove(name);
}
@@ -78,7 +99,7 @@
* remove organization display name
* @param name
*/
- public void removeOrganizationDisplayName( LocalizedNameType name )
+ public void removeOrganizationDisplayName(LocalizedNameType name)
{
this.organizationDisplayName.remove(name);
}
@@ -87,7 +108,7 @@
* remove organization url
* @param uri
*/
- public void removeOrganizationURL( LocalizedURIType uri )
+ public void removeOrganizationURL(LocalizedURIType uri)
{
this.organizationURL.remove(uri);
}
@@ -100,7 +121,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -112,7 +134,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -124,9 +147,9 @@
* {@link LocalizedNameType }
*
*/
- public List<LocalizedNameType> getOrganizationName()
+ public List<LocalizedNameType> getOrganizationName()
{
- return Collections.unmodifiableList( this.organizationName );
+ return Collections.unmodifiableList(this.organizationName);
}
/**
@@ -138,9 +161,9 @@
*
*
*/
- public List<LocalizedNameType> getOrganizationDisplayName()
+ public List<LocalizedNameType> getOrganizationDisplayName()
{
- return Collections.unmodifiableList( this.organizationDisplayName );
+ return Collections.unmodifiableList(this.organizationDisplayName);
}
/**
@@ -148,8 +171,8 @@
*
*/
- public List<LocalizedURIType> getOrganizationURL()
+ public List<LocalizedURIType> getOrganizationURL()
{
- return Collections.unmodifiableList( this.organizationURL );
+ return Collections.unmodifiableList(this.organizationURL);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/PDPDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/PDPDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/PDPDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for PDPDescriptorType complex type.
*
@@ -34,17 +54,16 @@
protected List<String> nameIDFormat = new ArrayList<String>();
-
public PDPDescriptorType(List<String> protocolSupport)
{
- super(protocolSupport);
+ super(protocolSupport);
}
/**
* Add authorization service
* @param endpt
*/
- public void addAuthZService( EndpointType endpt )
+ public void addAuthZService(EndpointType endpt)
{
this.authzService.add(endpt);
}
@@ -53,7 +72,7 @@
* Add assertion id request service
* @param endpt
*/
- public void addAssertionIDRequestService( EndpointType endpt )
+ public void addAssertionIDRequestService(EndpointType endpt)
{
this.assertionIDRequestService.add(endpt);
}
@@ -62,16 +81,16 @@
* Add Name ID Format
* @param str
*/
- public void addNameIDFormat( String str )
+ public void addNameIDFormat(String str)
{
this.nameIDFormat.add(str);
}
-
+
/**
* remove authorization service
* @param endpt
*/
- public void removeAuthZService( EndpointType endpt )
+ public void removeAuthZService(EndpointType endpt)
{
this.authzService.remove(endpt);
}
@@ -80,7 +99,7 @@
* remove assertion id request service
* @param endpt
*/
- public void removeAssertionIDRequestService( EndpointType endpt )
+ public void removeAssertionIDRequestService(EndpointType endpt)
{
this.assertionIDRequestService.remove(endpt);
}
@@ -89,7 +108,7 @@
* remove Name ID Format
* @param str
*/
- public void removeNameIDFormat( String str )
+ public void removeNameIDFormat(String str)
{
this.nameIDFormat.remove(str);
}
@@ -100,9 +119,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getAuthzService()
+ public List<EndpointType> getAuthzService()
{
- return Collections.unmodifiableList( this.authzService );
+ return Collections.unmodifiableList(this.authzService);
}
/**
@@ -112,9 +131,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getAssertionIDRequestService()
+ public List<EndpointType> getAssertionIDRequestService()
{
- return Collections.unmodifiableList( this.assertionIDRequestService );
+ return Collections.unmodifiableList(this.assertionIDRequestService);
}
/**
@@ -123,8 +142,8 @@
* Objects of the following type(s) are allowed in the list
* {@link String }
*/
- public List<String> getNameIDFormat()
+ public List<String> getNameIDFormat()
{
- return Collections.unmodifiableList( this.nameIDFormat );
+ return Collections.unmodifiableList(this.nameIDFormat);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RequestedAttributeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RequestedAttributeType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RequestedAttributeType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,11 +1,28 @@
-
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import org.picketlink.identity.federation.saml.v2.assertion.AttributeType;
-
/**
* <p>Java class for RequestedAttributeType complex type.
*
@@ -23,13 +40,13 @@
*
*
*/
-public class RequestedAttributeType
-extends AttributeType
+public class RequestedAttributeType extends AttributeType
{
+ private static final long serialVersionUID = 1L;
public RequestedAttributeType(String name)
{
- super(name);
+ super(name);
}
protected Boolean isRequired;
@@ -42,7 +59,7 @@
* {@link Boolean }
*
*/
- public Boolean isIsRequired()
+ public Boolean isIsRequired()
{
return isRequired;
}
@@ -55,7 +72,7 @@
* {@link Boolean }
*
*/
- public void setIsRequired(Boolean value)
+ public void setIsRequired(Boolean value)
{
this.isRequired = value;
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/RoleDescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -9,7 +30,6 @@
import org.picketlink.identity.xmlsec.w3.xmldsig.SignatureType;
-
/**
* <p>Java class for RoleDescriptorType complex type.
*
@@ -37,61 +57,70 @@
* </pre>
*
*
- */
+ */
public abstract class RoleDescriptorType extends TypeWithOtherAttributes
{
protected SignatureType signature;
+
protected ExtensionsType extensions;
+
protected List<KeyDescriptorType> keyDescriptor = new ArrayList<KeyDescriptorType>();
+
protected OrganizationType organization;
+
protected List<ContactType> contactPerson = new ArrayList<ContactType>();
+
protected String id;
+
protected XMLGregorianCalendar validUntil;
+
protected Duration cacheDuration;
+
protected List<String> protocolSupportEnumeration = new ArrayList<String>();
- protected String errorURL;
-
- public RoleDescriptorType( List<String> protocolSupport )
+
+ protected String errorURL;
+
+ public RoleDescriptorType(List<String> protocolSupport)
{
- protocolSupportEnumeration.addAll( protocolSupport );
+ protocolSupportEnumeration.addAll(protocolSupport);
}
-
+
/**
* Add key descriptor
* @param keyD
*/
- public void addKeyDescriptor( KeyDescriptorType keyD )
+ public void addKeyDescriptor(KeyDescriptorType keyD)
{
this.keyDescriptor.add(keyD);
}
-
+
/**
* Add contact
* @param contact
*/
- public void addContactPerson( ContactType contact )
+ public void addContactPerson(ContactType contact)
{
this.contactPerson.add(contact);
}
-
+
/**
* remove key descriptor
* @param keyD
*/
- public void removeKeyDescriptor( KeyDescriptorType keyD )
+ public void removeKeyDescriptor(KeyDescriptorType keyD)
{
this.keyDescriptor.remove(keyD);
}
-
+
/**
* remove contact
* @param contact
*/
- public void removeContactPerson( ContactType contact )
+ public void removeContactPerson(ContactType contact)
{
this.contactPerson.remove(contact);
}
-
+
/**
* Gets the value of the signature property.
*
@@ -100,7 +129,8 @@
* {@link SignatureType }
*
*/
- public SignatureType getSignature() {
+ public SignatureType getSignature()
+ {
return signature;
}
@@ -112,7 +142,8 @@
* {@link SignatureType }
*
*/
- public void setSignature(SignatureType value) {
+ public void setSignature(SignatureType value)
+ {
this.signature = value;
}
@@ -124,7 +155,8 @@
* {@link ExtensionsType }
*
*/
- public ExtensionsType getExtensions() {
+ public ExtensionsType getExtensions()
+ {
return extensions;
}
@@ -136,7 +168,8 @@
* {@link ExtensionsType }
*
*/
- public void setExtensions(ExtensionsType value) {
+ public void setExtensions(ExtensionsType value)
+ {
this.extensions = value;
}
@@ -148,8 +181,9 @@
*
*
*/
- public List<KeyDescriptorType> getKeyDescriptor() {
- return Collections.unmodifiableList( this.keyDescriptor );
+ public List<KeyDescriptorType> getKeyDescriptor()
+ {
+ return Collections.unmodifiableList(this.keyDescriptor);
}
/**
@@ -160,7 +194,8 @@
* {@link OrganizationType }
*
*/
- public OrganizationType getOrganization() {
+ public OrganizationType getOrganization()
+ {
return organization;
}
@@ -172,7 +207,8 @@
* {@link OrganizationType }
*
*/
- public void setOrganization(OrganizationType value) {
+ public void setOrganization(OrganizationType value)
+ {
this.organization = value;
}
@@ -184,8 +220,9 @@
*
*
*/
- public List<ContactType> getContactPerson() {
- return Collections.unmodifiableList( this.contactPerson );
+ public List<ContactType> getContactPerson()
+ {
+ return Collections.unmodifiableList(this.contactPerson);
}
/**
@@ -196,7 +233,8 @@
* {@link String }
*
*/
- public String getID() {
+ public String getID()
+ {
return id;
}
@@ -208,7 +246,8 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setID(String value)
+ {
this.id = value;
}
@@ -220,7 +259,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public XMLGregorianCalendar getValidUntil() {
+ public XMLGregorianCalendar getValidUntil()
+ {
return validUntil;
}
@@ -232,7 +272,8 @@
* {@link XMLGregorianCalendar }
*
*/
- public void setValidUntil(XMLGregorianCalendar value) {
+ public void setValidUntil(XMLGregorianCalendar value)
+ {
this.validUntil = value;
}
@@ -244,7 +285,8 @@
* {@link Duration }
*
*/
- public Duration getCacheDuration() {
+ public Duration getCacheDuration()
+ {
return cacheDuration;
}
@@ -256,7 +298,8 @@
* {@link Duration }
*
*/
- public void setCacheDuration(Duration value) {
+ public void setCacheDuration(Duration value)
+ {
this.cacheDuration = value;
}
@@ -268,8 +311,9 @@
*
*
*/
- public List<String> getProtocolSupportEnumeration() {
- return Collections.unmodifiableList( this.protocolSupportEnumeration );
+ public List<String> getProtocolSupportEnumeration()
+ {
+ return Collections.unmodifiableList(this.protocolSupportEnumeration);
}
/**
@@ -280,7 +324,8 @@
* {@link String }
*
*/
- public String getErrorURL() {
+ public String getErrorURL()
+ {
return errorURL;
}
@@ -292,7 +337,8 @@
* {@link String }
*
*/
- public void setErrorURL(String value) {
+ public void setErrorURL(String value)
+ {
this.errorURL = value;
- }
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SPSSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SPSSODescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SPSSODescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for SPSSODescriptorType complex type.
*
@@ -27,53 +47,55 @@
*
*
*/
-public class SPSSODescriptorType extends SSODescriptorType
+public class SPSSODescriptorType extends SSODescriptorType
{
protected List<IndexedEndpointType> assertionConsumerService = new ArrayList<IndexedEndpointType>();
+
protected List<AttributeConsumingServiceType> attributeConsumingService = new ArrayList<AttributeConsumingServiceType>();
+
protected Boolean authnRequestsSigned;
+
protected Boolean wantAssertionsSigned;
-
public SPSSODescriptorType(List<String> protocolSupport)
{
- super(protocolSupport);
+ super(protocolSupport);
}
-
+
/**
* Add an Assertion Consumer Service
* @param assertionConsumer an endpoint of type {@link IndexedEndpointType}
*/
- public void addAssertionConsumerService( IndexedEndpointType assertionConsumer )
+ public void addAssertionConsumerService(IndexedEndpointType assertionConsumer)
{
- this.assertionConsumerService.add( assertionConsumer );
+ this.assertionConsumerService.add(assertionConsumer);
}
-
+
/**
* Add an attribute consumer
* @param attributeConsumer an instance of type {@link AttributeConsumingServiceType}
*/
- public void addAttributeConsumerService( AttributeConsumingServiceType attributeConsumer )
+ public void addAttributeConsumerService(AttributeConsumingServiceType attributeConsumer)
{
- this.attributeConsumingService.add( attributeConsumer );
+ this.attributeConsumingService.add(attributeConsumer);
}
-
+
/**
* Remove an Assertion Consumer Service
* @param assertionConsumer an endpoint of type {@link IndexedEndpointType}
*/
- public void removeAssertionConsumerService( IndexedEndpointType assertionConsumer )
+ public void removeAssertionConsumerService(IndexedEndpointType assertionConsumer)
{
- this.assertionConsumerService.remove( assertionConsumer );
+ this.assertionConsumerService.remove(assertionConsumer);
}
-
+
/**
* Remove an attribute consumer
* @param attributeConsumer an instance of type {@link AttributeConsumingServiceType}
*/
- public void removeAttributeConsumerService( AttributeConsumingServiceType attributeConsumer )
+ public void removeAttributeConsumerService(AttributeConsumingServiceType attributeConsumer)
{
- this.attributeConsumingService.remove( attributeConsumer );
+ this.attributeConsumingService.remove(attributeConsumer);
}
/**
@@ -82,12 +104,10 @@
* Objects of the following type(s) are allowed in the list
* {@link IndexedEndpointType }
*/
- public List<IndexedEndpointType> getAssertionConsumerService()
+ public List<IndexedEndpointType> getAssertionConsumerService()
{
- return Collections.unmodifiableList( this.assertionConsumerService );
+ return Collections.unmodifiableList(this.assertionConsumerService);
}
-
-
/**
* Gets the value of the attributeConsumingService property.
@@ -95,9 +115,9 @@
* Objects of the following type(s) are allowed in the list
* {@link AttributeConsumingServiceType }
*/
- public List<AttributeConsumingServiceType> getAttributeConsumingService()
+ public List<AttributeConsumingServiceType> getAttributeConsumingService()
{
- return Collections.unmodifiableList( this.attributeConsumingService );
+ return Collections.unmodifiableList(this.attributeConsumingService);
}
/**
@@ -108,7 +128,8 @@
* {@link Boolean }
*
*/
- public Boolean isAuthnRequestsSigned() {
+ public Boolean isAuthnRequestsSigned()
+ {
return authnRequestsSigned;
}
@@ -120,7 +141,8 @@
* {@link Boolean }
*
*/
- public void setAuthnRequestsSigned(Boolean value) {
+ public void setAuthnRequestsSigned(Boolean value)
+ {
this.authnRequestsSigned = value;
}
@@ -132,7 +154,8 @@
* {@link Boolean }
*
*/
- public Boolean isWantAssertionsSigned() {
+ public Boolean isWantAssertionsSigned()
+ {
return wantAssertionsSigned;
}
@@ -144,7 +167,8 @@
* {@link Boolean }
*
*/
- public void setWantAssertionsSigned(Boolean value) {
+ public void setWantAssertionsSigned(Boolean value)
+ {
this.wantAssertionsSigned = value;
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SSODescriptorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SSODescriptorType.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/SSODescriptorType.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.saml.v2.metadata;
import java.util.ArrayList;
@@ -4,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-
/**
* <p>Java class for SSODescriptorType complex type.
*
@@ -29,22 +49,24 @@
*/
public abstract class SSODescriptorType extends RoleDescriptorType
{
- protected List<IndexedEndpointType> artifactResolutionService = new ArrayList<IndexedEndpointType>();
- protected List<EndpointType> singleLogoutService = new ArrayList<EndpointType>();
- protected List<EndpointType> manageNameIDService = new ArrayList<EndpointType>();
+ protected List<IndexedEndpointType> artifactResolutionService = new ArrayList<IndexedEndpointType>();
+
+ protected List<EndpointType> singleLogoutService = new ArrayList<EndpointType>();
+
+ protected List<EndpointType> manageNameIDService = new ArrayList<EndpointType>();
+
protected List<String> nameIDFormat = new ArrayList<String>();
-
public SSODescriptorType(List<String> protocolSupport)
{
- super(protocolSupport);
+ super(protocolSupport);
}
/**
* Add SLO Service
* @param endpt
*/
- public void addSingleLogoutService( EndpointType endpt )
+ public void addSingleLogoutService(EndpointType endpt)
{
this.singleLogoutService.add(endpt);
}
@@ -53,7 +75,7 @@
* Add atrifact resolution service
* @param i
*/
- public void addArtifactResolutionService( IndexedEndpointType i )
+ public void addArtifactResolutionService(IndexedEndpointType i)
{
this.artifactResolutionService.add(i);
}
@@ -62,7 +84,7 @@
* Add manage name id service
* @param end
*/
- public void addManageNameIDService( EndpointType end )
+ public void addManageNameIDService(EndpointType end)
{
this.manageNameIDService.add(end);
}
@@ -71,16 +93,16 @@
* Add Name ID Format
* @param s
*/
- public void addNameIDFormat( String s )
+ public void addNameIDFormat(String s)
{
this.nameIDFormat.add(s);
}
-
+
/**
* remove SLO Service
* @param endpt
*/
- public void removeSingleLogoutService( EndpointType endpt )
+ public void removeSingleLogoutService(EndpointType endpt)
{
this.singleLogoutService.remove(endpt);
}
@@ -89,7 +111,7 @@
* remove atrifact resolution service
* @param i
*/
- public void removeArtifactResolutionService( IndexedEndpointType i )
+ public void removeArtifactResolutionService(IndexedEndpointType i)
{
this.artifactResolutionService.remove(i);
}
@@ -98,7 +120,7 @@
* remove manage name id service
* @param end
*/
- public void removeManageNameIDService( EndpointType end )
+ public void removeManageNameIDService(EndpointType end)
{
this.manageNameIDService.remove(end);
}
@@ -107,7 +129,7 @@
* remove Name ID Format
* @param s
*/
- public void removeNameIDFormat( String s )
+ public void removeNameIDFormat(String s)
{
this.nameIDFormat.remove(s);
}
@@ -118,9 +140,9 @@
* Objects of the following type(s) are allowed in the list
* {@link IndexedEndpointType }
*/
- public List<IndexedEndpointType> getArtifactResolutionService()
- {
- return Collections.unmodifiableList( this.artifactResolutionService );
+ public List<IndexedEndpointType> getArtifactResolutionService()
+ {
+ return Collections.unmodifiableList(this.artifactResolutionService);
}
/**
@@ -129,9 +151,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getSingleLogoutService()
+ public List<EndpointType> getSingleLogoutService()
{
- return Collections.unmodifiableList( this.singleLogoutService );
+ return Collections.unmodifiableList(this.singleLogoutService);
}
/**
@@ -140,9 +162,9 @@
* Objects of the following type(s) are allowed in the list
* {@link EndpointType }
*/
- public List<EndpointType> getManageNameIDService()
+ public List<EndpointType> getManageNameIDService()
{
- return Collections.unmodifiableList( this.manageNameIDService );
+ return Collections.unmodifiableList(this.manageNameIDService);
}
/**
@@ -153,8 +175,8 @@
*
*
*/
- public List<String> getNameIDFormat()
+ public List<String> getNameIDFormat()
{
- return Collections.unmodifiableList( this.nameIDFormat );
- }
+ return Collections.unmodifiableList(this.nameIDFormat);
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/package-info.java 2011-06-21 20:46:32 UTC (rev 1017)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/metadata/package-info.java 2011-06-21 20:50:57 UTC (rev 1018)
@@ -1,9 +1,23 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.08 at 05:45:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.saml.v2.metadata;
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "urn:oasis:names:tc:SAML:2.0:metadata", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.saml.v2.metadata;
13 years, 6 months