Author: anil.saldhana(a)jboss.com
Date: 2009-09-17 14:17:49 -0400 (Thu, 17 Sep 2009)
New Revision: 799
Added:
identity-federation/trunk/jboss-identity-fed-core/src/test/java/org/jboss/test/identity/federation/core/saml/v2/SAML2ObjectUnitTestCase.java
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/SAML2Object.java
Modified:
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/RequestAbstractType.java
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/StatusResponseType.java
Log:
JBID-192: SAML2Object marker interface
Added:
identity-federation/trunk/jboss-identity-fed-core/src/test/java/org/jboss/test/identity/federation/core/saml/v2/SAML2ObjectUnitTestCase.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/test/java/org/jboss/test/identity/federation/core/saml/v2/SAML2ObjectUnitTestCase.java
(rev 0)
+++
identity-federation/trunk/jboss-identity-fed-core/src/test/java/org/jboss/test/identity/federation/core/saml/v2/SAML2ObjectUnitTestCase.java 2009-09-17
18:17:49 UTC (rev 799)
@@ -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.jboss.test.identity.federation.core.saml.v2;
+
+import org.jboss.identity.federation.saml.v2.SAML2Object;
+import org.jboss.identity.federation.saml.v2.protocol.AuthnRequestType;
+import org.jboss.identity.federation.saml.v2.protocol.LogoutRequestType;
+import org.jboss.identity.federation.saml.v2.protocol.ObjectFactory;
+import org.jboss.identity.federation.saml.v2.protocol.StatusResponseType;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test the SAML2Object interface
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Sep 17, 2009
+ */
+public class SAML2ObjectUnitTestCase extends TestCase
+{
+ public void testSAML2Object()
+ {
+ ObjectFactory factory = new ObjectFactory();
+
+ //Request Types
+ LogoutRequestType lo = factory.createLogoutRequestType();
+ assertTrue("LogOutRequest is SAML2Object?", lo instanceof SAML2Object);
+
+ AuthnRequestType ar = factory.createAuthnRequestType();
+ assertTrue("AuthnRequest is SAML2Object?", ar instanceof SAML2Object);
+
+ //Response Types
+ StatusResponseType status = factory.createStatusResponseType();
+ assertTrue("StatusResponseType is SAML2Object?", status instanceof
SAML2Object);
+ }
+}
\ No newline at end of file
Added:
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/SAML2Object.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/SAML2Object.java
(rev 0)
+++
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/SAML2Object.java 2009-09-17
18:17:49 UTC (rev 799)
@@ -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.jboss.identity.federation.saml.v2;
+
+/**
+ * Marker Interface
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Sep 17, 2009
+ */
+public interface SAML2Object
+{
+}
Modified:
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/RequestAbstractType.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/RequestAbstractType.java 2009-09-17
17:46:05 UTC (rev 798)
+++
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/RequestAbstractType.java 2009-09-17
18:17:49 UTC (rev 799)
@@ -20,6 +20,7 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;
+import org.jboss.identity.federation.saml.v2.SAML2Object;
import org.jboss.identity.federation.saml.v2.assertion.NameIDType;
import org.jboss.identity.xmlsec.w3.xmldsig.SignatureType;
@@ -65,7 +66,7 @@
AssertionIDRequestType.class,
AuthnRequestType.class
})
-public abstract class RequestAbstractType {
+public abstract class RequestAbstractType implements SAML2Object {
@XmlElement(name = "Issuer", namespace =
"urn:oasis:names:tc:SAML:2.0:assertion")
protected NameIDType issuer;
Modified:
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/StatusResponseType.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/StatusResponseType.java 2009-09-17
17:46:05 UTC (rev 798)
+++
identity-federation/trunk/jboss-identity-fed-model/src/main/java/org/jboss/identity/federation/saml/v2/protocol/StatusResponseType.java 2009-09-17
18:17:49 UTC (rev 799)
@@ -20,6 +20,7 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;
+import org.jboss.identity.federation.saml.v2.SAML2Object;
import org.jboss.identity.federation.saml.v2.assertion.NameIDType;
import org.jboss.identity.xmlsec.w3.xmldsig.SignatureType;
@@ -64,7 +65,7 @@
ResponseType.class,
NameIDMappingResponseType.class
})
-public class StatusResponseType {
+public class StatusResponseType implements SAML2Object {
@XmlElement(name = "Issuer", namespace =
"urn:oasis:names:tc:SAML:2.0:assertion")
protected NameIDType issuer;