You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2011/10/29 21:41:14 UTC

svn commit: r1194994 - in /axis/axis2/java/rampart/trunk/modules: rampart-core/src/main/java/org/apache/rampart/Rampart.java rampart-trust-mar/module.xml rampart-trust/src/main/java/org/apache/rahas/Rahas.java

Author: veithen
Date: Sat Oct 29 19:41:14 2011
New Revision: 1194994

URL: http://svn.apache.org/viewvc?rev=1194994&view=rev
Log:
Moved the OpenSAML initialization to the right place, i.e. the init method of the Rahas module.

Added:
    axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java   (with props)
Modified:
    axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
    axis/axis2/java/rampart/trunk/modules/rampart-trust-mar/module.xml

Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java?rev=1194994&r1=1194993&r2=1194994&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java Sat Oct 29 19:41:14 2011
@@ -26,18 +26,11 @@ import org.apache.neethi.Policy;
 import org.apache.rampart.policy.model.RampartConfig;
 import org.apache.ws.secpolicy.SP11Constants;
 import org.apache.ws.secpolicy.SP12Constants;
-import org.opensaml.DefaultBootstrap;
-import org.opensaml.xml.ConfigurationException;
 
 public class Rampart implements Module /* , ModulePolicyExtension */  {
 
     public void init(ConfigurationContext configContext, AxisModule module)
             throws AxisFault {
-        try {
-            DefaultBootstrap.bootstrap();
-        } catch (ConfigurationException ex) {
-            throw new AxisFault("Failed to bootstrap OpenSAML", ex);
-        }
     }
 
     public void engageNotify(AxisDescription axisDescription) throws AxisFault {

Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust-mar/module.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust-mar/module.xml?rev=1194994&r1=1194993&r2=1194994&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust-mar/module.xml (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust-mar/module.xml Sat Oct 29 19:41:14 2011
@@ -1,4 +1,4 @@
-<module name="rahas">
+<module name="rahas" class="org.apache.rahas.Rahas">
     <Description>This module is used to STS enable a service where it adds
         the RequestSecurityToken operation to a service that the module is engaged to</Description>
 

Added: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java?rev=1194994&view=auto
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java (added)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java Sat Oct 29 19:41:14 2011
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rahas;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisDescription;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.modules.Module;
+import org.apache.neethi.Assertion;
+import org.apache.neethi.Policy;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.xml.ConfigurationException;
+
+public class Rahas implements Module {
+    public void init(ConfigurationContext configContext, AxisModule module)
+            throws AxisFault {
+        try {
+            DefaultBootstrap.bootstrap();
+        } catch (ConfigurationException ex) {
+            throw new AxisFault("Failed to bootstrap OpenSAML", ex);
+        }
+    }
+
+    public void engageNotify(AxisDescription axisDescription) throws AxisFault {
+    }
+
+    public boolean canSupportAssertion(Assertion assertion) {
+        return false;
+    }
+
+    public void applyPolicy(Policy policy, AxisDescription axisDescription)
+            throws AxisFault {
+    }
+
+    public void shutdown(ConfigurationContext configurationContext)
+            throws AxisFault {
+    }
+}

Propchange: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java
------------------------------------------------------------------------------
    svn:eol-style = native