Author: anil.saldhana(a)jboss.com
Date: 2009-10-12 23:32:56 -0400 (Mon, 12 Oct 2009)
New Revision: 854
Added:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/SAML2SecurityToken.java
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/common/SAMLDocumentHolder.java
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/WSTrustJAXBFactory.java
Log:
make SAMLDocumentHolder to hold SAML2Object
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/common/SAMLDocumentHolder.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/common/SAMLDocumentHolder.java 2009-10-13
02:59:44 UTC (rev 853)
+++
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/common/SAMLDocumentHolder.java 2009-10-13
03:32:56 UTC (rev 854)
@@ -21,6 +21,7 @@
*/
package org.jboss.identity.federation.core.saml.v2.common;
+import org.jboss.identity.federation.saml.v2.SAML2Object;
import org.w3c.dom.Document;
/**
@@ -36,10 +37,10 @@
*/
public class SAMLDocumentHolder
{
- private Object samlObject;
+ private SAML2Object samlObject;
private Document samlDocument;
- public SAMLDocumentHolder(Object samlObject)
+ public SAMLDocumentHolder(SAML2Object samlObject)
{
this.samlObject = samlObject;
}
@@ -49,18 +50,18 @@
this.samlDocument = samlDocument;
}
- public SAMLDocumentHolder(Object samlObject, Document samlDocument)
+ public SAMLDocumentHolder(SAML2Object samlObject, Document samlDocument)
{
this.samlObject = samlObject;
this.samlDocument = samlDocument;
}
- public Object getSamlObject()
+ public SAML2Object getSamlObject()
{
return samlObject;
}
- public void setSamlObject(Object samlObject)
+ public void setSamlObject(SAML2Object samlObject)
{
this.samlObject = samlObject;
}
Added:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/SAML2SecurityToken.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/SAML2SecurityToken.java
(rev 0)
+++
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/SAML2SecurityToken.java 2009-10-13
03:32:56 UTC (rev 854)
@@ -0,0 +1,45 @@
+/*
+ * 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.core.wstrust;
+
+import org.jboss.identity.federation.saml.v2.SAML2Object;
+import org.jboss.identity.federation.ws.trust.RequestSecurityTokenType;
+
+/**
+ * A Security Token that is based on SAML2
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Oct 12, 2009
+ */
+public class SAML2SecurityToken implements SAML2Object
+{
+ private RequestSecurityTokenType token;
+
+ public SAML2SecurityToken(RequestSecurityTokenType token)
+ {
+ this.token = token;
+ }
+
+ public RequestSecurityTokenType getToken()
+ {
+ return token;
+ }
+}
\ No newline at end of file
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/WSTrustJAXBFactory.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/WSTrustJAXBFactory.java 2009-10-13
02:59:44 UTC (rev 853)
+++
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/WSTrustJAXBFactory.java 2009-10-13
03:32:56 UTC (rev 854)
@@ -143,7 +143,9 @@
jaxbRST = (JAXBElement<RequestSecurityTokenType>) binder.unmarshal(rst);
RequestSecurityTokenType rstt = jaxbRST.getValue();
- holders.set(new SAMLDocumentHolder(rstt, document));
+
+ SAML2SecurityToken samlSecurityToken = new SAML2SecurityToken(rstt);
+ holders.set(new SAMLDocumentHolder(samlSecurityToken, document));
return new RequestSecurityToken(rstt);
}
catch (JAXBException e)