Author: sguilhen(a)redhat.com
Date: 2009-04-06 16:35:09 -0400 (Mon, 06 Apr 2009)
New Revision: 430
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/AuthPropertyType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncAlgoType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncryptionType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/IDPType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyProviderType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyValueType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ObjectFactory.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ProviderType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/SPType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/STSType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProviderType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProvidersType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProviderType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProvidersType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TrustType.java
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/package-info.java
identity-federation/trunk/identity-bindings/src/main/resources/schema/config/jboss-identity-fed.xsd
identity-federation/trunk/identity-bindings/src/test/java/org/jboss/test/identity/federation/bindings/config/ConfigUnitTestCase.java
identity-federation/trunk/identity-bindings/src/test/resources/config/test-config-4.xml
Log:
Changed the STS elements in jboss-identity-fed.xsd to use attributes instead of simple
elements when default values are needed
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/AuthPropertyType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/AuthPropertyType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/AuthPropertyType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncAlgoType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncAlgoType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncAlgoType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncryptionType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncryptionType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/EncryptionType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/IDPType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/IDPType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/IDPType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyProviderType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyProviderType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyProviderType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyValueType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyValueType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/KeyValueType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ObjectFactory.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ObjectFactory.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ObjectFactory.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
@@ -43,6 +43,22 @@
}
/**
+ * Create an instance of {@link ServiceProviderType }
+ *
+ */
+ public ServiceProviderType createServiceProviderType() {
+ return new ServiceProviderType();
+ }
+
+ /**
+ * Create an instance of {@link STSType }
+ *
+ */
+ public STSType createSTSType() {
+ return new STSType();
+ }
+
+ /**
* Create an instance of {@link SPType }
*
*/
@@ -51,27 +67,27 @@
}
/**
- * Create an instance of {@link KeyProviderType }
+ * Create an instance of {@link TrustType }
*
*/
- public KeyProviderType createKeyProviderType() {
- return new KeyProviderType();
+ public TrustType createTrustType() {
+ return new TrustType();
}
/**
- * Create an instance of {@link ProviderType }
+ * Create an instance of {@link TokenProvidersType }
*
*/
- public ProviderType createProviderType() {
- return new ProviderType();
+ public TokenProvidersType createTokenProvidersType() {
+ return new TokenProvidersType();
}
/**
- * Create an instance of {@link EncryptionType }
+ * Create an instance of {@link ProviderType }
*
*/
- public EncryptionType createEncryptionType() {
- return new EncryptionType();
+ public ProviderType createProviderType() {
+ return new ProviderType();
}
/**
@@ -83,22 +99,14 @@
}
/**
- * Create an instance of {@link TrustType }
+ * Create an instance of {@link TokenProviderType }
*
*/
- public TrustType createTrustType() {
- return new TrustType();
+ public TokenProviderType createTokenProviderType() {
+ return new TokenProviderType();
}
/**
- * Create an instance of {@link STSType }
- *
- */
- public STSType createSTSType() {
- return new STSType();
- }
-
- /**
* Create an instance of {@link IDPType }
*
*/
@@ -107,19 +115,19 @@
}
/**
- * Create an instance of {@link ServiceProviderType }
+ * Create an instance of {@link EncryptionType }
*
*/
- public ServiceProviderType createServiceProviderType() {
- return new ServiceProviderType();
+ public EncryptionType createEncryptionType() {
+ return new EncryptionType();
}
/**
- * Create an instance of {@link TokenProvidersType }
+ * Create an instance of {@link ServiceProvidersType }
*
*/
- public TokenProvidersType createTokenProvidersType() {
- return new TokenProvidersType();
+ public ServiceProvidersType createServiceProvidersType() {
+ return new ServiceProvidersType();
}
/**
@@ -131,22 +139,14 @@
}
/**
- * Create an instance of {@link TokenProviderType }
+ * Create an instance of {@link KeyProviderType }
*
*/
- public TokenProviderType createTokenProviderType() {
- return new TokenProviderType();
+ public KeyProviderType createKeyProviderType() {
+ return new KeyProviderType();
}
/**
- * Create an instance of {@link ServiceProvidersType }
- *
- */
- public ServiceProvidersType createServiceProvidersType() {
- return new ServiceProvidersType();
- }
-
- /**
* Create an instance of {@link JAXBElement }{@code <}{@link IDPType }{@code
>}}
*
*/
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ProviderType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ProviderType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ProviderType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/SPType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/SPType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/SPType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/STSType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/STSType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/STSType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
@@ -10,6 +10,7 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -24,14 +25,14 @@
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="STSName"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="TokenTimeout"
type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
- * <element name="EncryptToken"
type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="KeyProvider"
type="{urn:jboss:identity-federation:config:1.0}KeyProviderType"
minOccurs="0"/>
* <element name="RequestHandler"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TokenProviders"
type="{urn:jboss:identity-federation:config:1.0}TokenProvidersType"
minOccurs="0"/>
* <element name="ServiceProviders"
type="{urn:jboss:identity-federation:config:1.0}ServiceProvidersType"
minOccurs="0"/>
* </sequence>
+ * <attribute name="STSName"
type="{http://www.w3.org/2001/XMLSchema}string" default="JBossSTS"
/>
+ * <attribute name="TokenTimeout"
type="{http://www.w3.org/2001/XMLSchema}int" default="3600" />
+ * <attribute name="EncryptToken"
type="{http://www.w3.org/2001/XMLSchema}boolean" default="false"
/>
* </restriction>
* </complexContent>
* </complexType>
@@ -41,9 +42,6 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "STSType", propOrder = {
- "stsName",
- "tokenTimeout",
- "encryptToken",
"keyProvider",
"requestHandler",
"tokenProviders",
@@ -51,12 +49,6 @@
})
public class STSType {
- @XmlElement(name = "STSName", defaultValue = "JBossSTS")
- protected String stsName;
- @XmlElement(name = "TokenTimeout", defaultValue = "3600")
- protected Integer tokenTimeout;
- @XmlElement(name = "EncryptToken", defaultValue = "false")
- protected Boolean encryptToken;
@XmlElement(name = "KeyProvider")
protected KeyProviderType keyProvider;
@XmlElement(name = "RequestHandler")
@@ -65,173 +57,191 @@
protected TokenProvidersType tokenProviders;
@XmlElement(name = "ServiceProviders")
protected ServiceProvidersType serviceProviders;
+ @XmlAttribute(name = "STSName")
+ protected String stsName;
+ @XmlAttribute(name = "TokenTimeout")
+ protected Integer tokenTimeout;
+ @XmlAttribute(name = "EncryptToken")
+ protected Boolean encryptToken;
/**
- * Gets the value of the stsName property.
+ * Gets the value of the keyProvider property.
*
* @return
* possible object is
- * {@link String }
+ * {@link KeyProviderType }
*
*/
- public String getSTSName() {
- return stsName;
+ public KeyProviderType getKeyProvider() {
+ return keyProvider;
}
/**
- * Sets the value of the stsName property.
+ * Sets the value of the keyProvider property.
*
* @param value
* allowed object is
- * {@link String }
+ * {@link KeyProviderType }
*
*/
- public void setSTSName(String value) {
- this.stsName = value;
+ public void setKeyProvider(KeyProviderType value) {
+ this.keyProvider = value;
}
/**
- * Gets the value of the tokenTimeout property.
+ * Gets the value of the requestHandler property.
*
* @return
* possible object is
- * {@link Integer }
+ * {@link String }
*
*/
- public Integer getTokenTimeout() {
- return tokenTimeout;
+ public String getRequestHandler() {
+ return requestHandler;
}
/**
- * Sets the value of the tokenTimeout property.
+ * Sets the value of the requestHandler property.
*
* @param value
* allowed object is
- * {@link Integer }
+ * {@link String }
*
*/
- public void setTokenTimeout(Integer value) {
- this.tokenTimeout = value;
+ public void setRequestHandler(String value) {
+ this.requestHandler = value;
}
/**
- * Gets the value of the encryptToken property.
+ * Gets the value of the tokenProviders property.
*
* @return
* possible object is
- * {@link Boolean }
+ * {@link TokenProvidersType }
*
*/
- public Boolean isEncryptToken() {
- return encryptToken;
+ public TokenProvidersType getTokenProviders() {
+ return tokenProviders;
}
/**
- * Sets the value of the encryptToken property.
+ * Sets the value of the tokenProviders property.
*
* @param value
* allowed object is
- * {@link Boolean }
+ * {@link TokenProvidersType }
*
*/
- public void setEncryptToken(Boolean value) {
- this.encryptToken = value;
+ public void setTokenProviders(TokenProvidersType value) {
+ this.tokenProviders = value;
}
/**
- * Gets the value of the keyProvider property.
+ * Gets the value of the serviceProviders property.
*
* @return
* possible object is
- * {@link KeyProviderType }
+ * {@link ServiceProvidersType }
*
*/
- public KeyProviderType getKeyProvider() {
- return keyProvider;
+ public ServiceProvidersType getServiceProviders() {
+ return serviceProviders;
}
/**
- * Sets the value of the keyProvider property.
+ * Sets the value of the serviceProviders property.
*
* @param value
* allowed object is
- * {@link KeyProviderType }
+ * {@link ServiceProvidersType }
*
*/
- public void setKeyProvider(KeyProviderType value) {
- this.keyProvider = value;
+ public void setServiceProviders(ServiceProvidersType value) {
+ this.serviceProviders = value;
}
/**
- * Gets the value of the requestHandler property.
+ * Gets the value of the stsName property.
*
* @return
* possible object is
* {@link String }
*
*/
- public String getRequestHandler() {
- return requestHandler;
+ public String getSTSName() {
+ if (stsName == null) {
+ return "JBossSTS";
+ } else {
+ return stsName;
+ }
}
/**
- * Sets the value of the requestHandler property.
+ * Sets the value of the stsName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
- public void setRequestHandler(String value) {
- this.requestHandler = value;
+ public void setSTSName(String value) {
+ this.stsName = value;
}
/**
- * Gets the value of the tokenProviders property.
+ * Gets the value of the tokenTimeout property.
*
* @return
* possible object is
- * {@link TokenProvidersType }
+ * {@link Integer }
*
*/
- public TokenProvidersType getTokenProviders() {
- return tokenProviders;
+ public int getTokenTimeout() {
+ if (tokenTimeout == null) {
+ return 3600;
+ } else {
+ return tokenTimeout;
+ }
}
/**
- * Sets the value of the tokenProviders property.
+ * Sets the value of the tokenTimeout property.
*
* @param value
* allowed object is
- * {@link TokenProvidersType }
+ * {@link Integer }
*
*/
- public void setTokenProviders(TokenProvidersType value) {
- this.tokenProviders = value;
+ public void setTokenTimeout(Integer value) {
+ this.tokenTimeout = value;
}
/**
- * Gets the value of the serviceProviders property.
+ * Gets the value of the encryptToken property.
*
* @return
* possible object is
- * {@link ServiceProvidersType }
+ * {@link Boolean }
*
*/
- public ServiceProvidersType getServiceProviders() {
- return serviceProviders;
+ public boolean isEncryptToken() {
+ if (encryptToken == null) {
+ return false;
+ } else {
+ return encryptToken;
+ }
}
/**
- * Sets the value of the serviceProviders property.
+ * Sets the value of the encryptToken property.
*
* @param value
* allowed object is
- * {@link ServiceProvidersType }
+ * {@link Boolean }
*
*/
- public void setServiceProviders(ServiceProvidersType value) {
- this.serviceProviders = value;
+ public void setEncryptToken(Boolean value) {
+ this.encryptToken = value;
}
}
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProviderType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProviderType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProviderType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
@@ -11,7 +11,6 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -31,11 +30,9 @@
* <complexType name="ServiceProviderType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="TruststoreAlias"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="TokenType"
type="{http://www.w3.org/2001/XMLSchema}string"/>
- * </sequence>
- * <attribute name="endpoint"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="endpoint" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="TruststoreAlias" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="TokenType" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
@@ -44,89 +41,86 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ServiceProviderType", propOrder = {
- "truststoreAlias",
- "tokenType"
-})
+@XmlType(name = "ServiceProviderType")
public class ServiceProviderType {
- @XmlElement(name = "TruststoreAlias")
+ @XmlAttribute(required = true)
+ protected String endpoint;
+ @XmlAttribute(name = "TruststoreAlias", required = true)
protected String truststoreAlias;
- @XmlElement(name = "TokenType", required = true)
+ @XmlAttribute(name = "TokenType", required = true)
protected String tokenType;
- @XmlAttribute
- protected String endpoint;
/**
- * Gets the value of the truststoreAlias property.
+ * Gets the value of the endpoint property.
*
* @return
* possible object is
* {@link String }
*
*/
- public String getTruststoreAlias() {
- return truststoreAlias;
+ public String getEndpoint() {
+ return endpoint;
}
/**
- * Sets the value of the truststoreAlias property.
+ * Sets the value of the endpoint property.
*
* @param value
* allowed object is
* {@link String }
*
*/
- public void setTruststoreAlias(String value) {
- this.truststoreAlias = value;
+ public void setEndpoint(String value) {
+ this.endpoint = value;
}
/**
- * Gets the value of the tokenType property.
+ * Gets the value of the truststoreAlias property.
*
* @return
* possible object is
* {@link String }
*
*/
- public String getTokenType() {
- return tokenType;
+ public String getTruststoreAlias() {
+ return truststoreAlias;
}
/**
- * Sets the value of the tokenType property.
+ * Sets the value of the truststoreAlias property.
*
* @param value
* allowed object is
* {@link String }
*
*/
- public void setTokenType(String value) {
- this.tokenType = value;
+ public void setTruststoreAlias(String value) {
+ this.truststoreAlias = value;
}
/**
- * Gets the value of the endpoint property.
+ * Gets the value of the tokenType property.
*
* @return
* possible object is
* {@link String }
*
*/
- public String getEndpoint() {
- return endpoint;
+ public String getTokenType() {
+ return tokenType;
}
/**
- * Sets the value of the endpoint property.
+ * Sets the value of the tokenType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
- public void setEndpoint(String value) {
- this.endpoint = value;
+ public void setTokenType(String value) {
+ this.tokenType = value;
}
}
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProvidersType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProvidersType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/ServiceProvidersType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProviderType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProviderType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProviderType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
@@ -10,7 +10,7 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
@@ -23,10 +23,8 @@
* <complexType name="TokenProviderType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="ProviderClass"
type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="TokenType"
type="{http://www.w3.org/2001/XMLSchema}string"/>
- * </sequence>
+ * <attribute name="ProviderClass" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="TokenType" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
@@ -35,15 +33,12 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TokenProviderType", propOrder = {
- "providerClass",
- "tokenType"
-})
+@XmlType(name = "TokenProviderType")
public class TokenProviderType {
- @XmlElement(name = "ProviderClass", required = true)
+ @XmlAttribute(name = "ProviderClass", required = true)
protected String providerClass;
- @XmlElement(name = "TokenType", required = true)
+ @XmlAttribute(name = "TokenType", required = true)
protected String tokenType;
/**
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProvidersType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProvidersType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TokenProvidersType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TrustType.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TrustType.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/TrustType.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/package-info.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/package-info.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/config/package-info.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.04.06 at 10:56:34 AM GMT-03:00
+// Generated on: 2009.04.06 at 05:23:23 PM GMT-03:00
//
@javax.xml.bind.annotation.XmlSchema(namespace =
"urn:jboss:identity-federation:config:1.0", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
Modified:
identity-federation/trunk/identity-bindings/src/main/resources/schema/config/jboss-identity-fed.xsd
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/resources/schema/config/jboss-identity-fed.xsd 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/main/resources/schema/config/jboss-identity-fed.xsd 2009-04-06
20:35:09 UTC (rev 430)
@@ -158,15 +158,15 @@
<complexType name="STSType">
<sequence>
- <element name="STSName" default="JBossSTS"
type="string" minOccurs="0"/>
- <element name="TokenTimeout" default="3600"
type="int" minOccurs="0"/>
- <element name="EncryptToken" default="false"
type="boolean" minOccurs="0"/>
<element name="KeyProvider" type="tns:KeyProviderType"
maxOccurs="1" minOccurs="0"/>
<element name="RequestHandler" type="string"
minOccurs="0"/>
<element name="TokenProviders" type="tns:TokenProvidersType"
minOccurs="0"/>
<element name="ServiceProviders"
type="tns:ServiceProvidersType" minOccurs="0"/>
</sequence>
+ <attribute name="STSName" default="JBossSTS"
type="string" use="optional"/>
+ <attribute name="TokenTimeout" default="3600"
type="int" use="optional"/>
+ <attribute name="EncryptToken" default="false"
type="boolean" use="optional"/>
</complexType>
<complexType name="TokenProvidersType">
@@ -183,10 +183,8 @@
</complexType>
<complexType name="TokenProviderType">
- <sequence>
- <element name="ProviderClass" type="string"
minOccurs="1"/>
- <element name="TokenType" type="string"
minOccurs="1"/>
- </sequence>
+ <attribute name="ProviderClass" type="string"
use="required"/>
+ <attribute name="TokenType" type="string"
use="required"/>
</complexType>
<complexType name="ServiceProvidersType">
@@ -209,11 +207,9 @@
generated token.
</documentation>
</annotation>
- <sequence>
- <element name="TruststoreAlias" type="string"
minOccurs="0"/>
- <element name="TokenType" type="string"
minOccurs="1"/>
- </sequence>
- <attribute name="endpoint" type="string"/>
+ <attribute name="endpoint" type="string"
use="required"/>
+ <attribute name="TruststoreAlias" type="string"
use="required"/>
+ <attribute name="TokenType" type="string"
use="required"/>
</complexType>
<element name="JBossSTS" type="tns:STSType"/>
Modified:
identity-federation/trunk/identity-bindings/src/test/java/org/jboss/test/identity/federation/bindings/config/ConfigUnitTestCase.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/test/java/org/jboss/test/identity/federation/bindings/config/ConfigUnitTestCase.java 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/test/java/org/jboss/test/identity/federation/bindings/config/ConfigUnitTestCase.java 2009-04-06
20:35:09 UTC (rev 430)
@@ -140,7 +140,7 @@
STSType stsType = ((JAXBElement<STSType>) object).getValue();
// general STS configurations.
assertEquals("Unexpected STS name", "Test STS",
stsType.getSTSName());
- assertEquals("Unexpected token timeout value", 7200,
stsType.getTokenTimeout().intValue());
+ assertEquals("Unexpected token timeout value", 7200,
stsType.getTokenTimeout());
assertTrue("Encryption of tokens should have been enabled",
stsType.isEncryptToken());
// we don't verify all values of the key provider config as it has been done in
the other test scenarios.
assertNotNull("Unexpected null key provider", stsType.getKeyProvider());
Modified:
identity-federation/trunk/identity-bindings/src/test/resources/config/test-config-4.xml
===================================================================
---
identity-federation/trunk/identity-bindings/src/test/resources/config/test-config-4.xml 2009-04-06
18:34:54 UTC (rev 429)
+++
identity-federation/trunk/identity-bindings/src/test/resources/config/test-config-4.xml 2009-04-06
20:35:09 UTC (rev 430)
@@ -1,7 +1,5 @@
-<JBossSTS xmlns="urn:jboss:identity-federation:config:1.0">
- <STSName>Test STS</STSName>
- <TokenTimeout>7200</TokenTimeout>
- <EncryptToken>true</EncryptToken>
+<JBossSTS xmlns="urn:jboss:identity-federation:config:1.0"
+ STSName="Test STS" TokenTimeout="7200"
EncryptToken="true">
<KeyProvider ClassName="SomeClass">
<ValidatingAlias Key="localhost" Value="localhostalias"/>
<ValidatingAlias Key="jboss.com" Value="jbossalias"/>
@@ -9,15 +7,10 @@
</KeyProvider>
<RequestHandler>org.jboss.identity.federation.wstrust.Handler</RequestHandler>
<TokenProviders>
- <TokenProvider>
- <ProviderClass>org.jboss.SpecialTokenProvider</ProviderClass>
- <TokenType>specialToken</TokenType>
- </TokenProvider>
+ <TokenProvider ProviderClass="org.jboss.SpecialTokenProvider"
TokenType="specialToken"/>
</TokenProviders>
<ServiceProviders>
- <ServiceProvider endpoint="http://provider.endpoint/provider">
- <TruststoreAlias>providerAlias</TruststoreAlias>
- <TokenType>specialToken</TokenType>
- </ServiceProvider>
+ <ServiceProvider endpoint="http://provider.endpoint/provider"
TokenType="specialToken"
+ TruststoreAlias="providerAlias"/>
</ServiceProviders>
</JBossSTS>
\ No newline at end of file