2 new revisions:
Revision: 4718b6a5364b
Author: josemrecio <[email protected]>
Date: Mon Apr 8 03:05:58 2013
Log: Update Issue 204...
http://code.google.com/p/sipservlets/source/detail?r=4718b6a5364b
Revision: b913e147fbf5
Author: josemrecio <[email protected]>
Date: Mon Apr 8 03:07:28 2013
Log: Update Issue 204...
http://code.google.com/p/sipservlets/source/detail?r=b913e147fbf5
==============================================================================
Revision: 4718b6a5364b
Author: josemrecio <[email protected]>
Date: Mon Apr 8 03:05:58 2013
Log: Update Issue 204
Backport to master
Added support for identity-assertion configuration via sip.xml
(cherry picked from commit 3afcc4466352fb2e0df8e2de7d8383e517a7ab09)
http://code.google.com/p/sipservlets/source/detail?r=4718b6a5364b
Added:
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/parser/IdentityAssertionParser.java
=======================================
--- /dev/null
+++
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/parser/IdentityAssertionParser.java
Mon Apr 8 03:05:58 2013
@@ -0,0 +1,76 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * and individual contributors
+ * by the @authors tag. See the copyright.txt 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.mobicents.metadata.sip.parser;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.jboss.metadata.parser.util.MetaDataElementParser;
+import org.mobicents.metadata.sip.spec.Attribute;
+import org.mobicents.metadata.sip.spec.Element;
+import org.mobicents.metadata.sip.spec.IdentityAssertionMetaData;
+
+/**
+ * @author [email protected]
+ */
+public class IdentityAssertionParser extends MetaDataElementParser {
+
+ public static IdentityAssertionMetaData parse(XMLStreamReader reader)
throws XMLStreamException {
+ IdentityAssertionMetaData idAssertionConfig = new
IdentityAssertionMetaData();
+
+ // Handle attributes
+ final int count = reader.getAttributeCount();
+ for (int i = 0; i < count; i++) {
+ final String value = reader.getAttributeValue(i);
+ if (attributeHasNamespace(reader, i)) {
+ continue;
+ }
+ final Attribute attribute =
Attribute.forName(reader.getAttributeLocalName(i));
+ switch (attribute) {
+ case ID: {
+ idAssertionConfig.setId(value);
+ break;
+ }
+ default:
+ throw unexpectedAttribute(reader, i);
+ }
+ }
+
+ // Handle elements
+ while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
+ final Element element = Element.forName(reader.getLocalName());
+ switch (element) {
+ case IDENTITY_ASSERTION_SCHEME:
+
idAssertionConfig.setIdentityAssertionScheme(getElementText(reader));
+ break;
+ case IDENTITY_ASSERTION_SUPPORT:
+
idAssertionConfig.setIdentityAssertionSupport(getElementText(reader));
+ break;
+ default:
+ throw unexpectedElement(reader);
+ }
+ }
+
+ return idAssertionConfig;
+ }
+
+}
==============================================================================
Revision: b913e147fbf5
Author: josemrecio <[email protected]>
Date: Mon Apr 8 03:07:28 2013
Log: Update Issue 204
Backport to Master
Added support for identity-assertion configuration via sip.xml (previous
commit was incomplete)
(cherry picked from commit 3c849f19a6592f6a8ef8a88e51b36840b50b9194)
http://code.google.com/p/sipservlets/source/detail?r=b913e147fbf5
Modified:
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/parser/SipLoginConfigMetaDataParser.java
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/spec/Element.java
=======================================
---
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/parser/SipLoginConfigMetaDataParser.java
Fri Aug 10 09:37:28 2012
+++
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/parser/SipLoginConfigMetaDataParser.java
Mon Apr 8 03:07:28 2013
@@ -31,6 +31,7 @@
/**
* @author Remy Maucherat
+ * @author [email protected]
*/
public class SipLoginConfigMetaDataParser extends MetaDataElementParser {
@@ -66,10 +67,8 @@
loginConfig.setRealmName(getElementText(reader));
break;
case IDENTITY_ASSERTION:
- // TODO: add identity_assertion parser
- //
loginConfig.setIdentityAssertion(IdentityAssertionParser.parse(reader))
- // break;
- throw unexpectedElement(reader);
+
loginConfig.setIdentityAssertion(IdentityAssertionParser.parse(reader));
+ break;
default:
throw unexpectedElement(reader);
}
=======================================
---
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/spec/Element.java
Fri Aug 10 09:37:28 2012
+++
/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/metadata/sip/spec/Element.java
Mon Apr 8 03:07:28 2013
@@ -43,6 +43,8 @@
EQUAL("equal"),
EXISTS("exists"),
IDENTITY_ASSERTION("identity-assertion"),
+ IDENTITY_ASSERTION_SCHEME("identity-assertion-scheme"),
+ IDENTITY_ASSERTION_SUPPORT("identity-assertion-support"),
LISTENER("listener"),
LOCALE_ENCODING_MAPPING_LIST("locale-encoding-mapping-list"),
LOGIN_CONFIG("login-config"),
--
---
You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.