Author: keith
Date: Tue Jan 15 19:57:42 2008
New Revision: 12295
Log:
Renaming the servicename of the MashupAdminService.
Modified:
trunk/mashup/java/modules/admin/module/src/org/wso2/mashup/admin/handler/AuthenticationHandler.java
trunk/mashup/java/modules/admin/service/META-INF/services.xml
trunk/mashup/java/modules/core/src/org/wso2/mashup/MashupConstants.java
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
Modified:
trunk/mashup/java/modules/admin/module/src/org/wso2/mashup/admin/handler/AuthenticationHandler.java
==============================================================================
---
trunk/mashup/java/modules/admin/module/src/org/wso2/mashup/admin/handler/AuthenticationHandler.java
(original)
+++
trunk/mashup/java/modules/admin/module/src/org/wso2/mashup/admin/handler/AuthenticationHandler.java
Tue Jan 15 19:57:42 2008
@@ -19,6 +19,8 @@
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -62,13 +64,15 @@
}
private boolean needsAuthentication() {
- String serviceName = msgContext.getAxisService().getName();
- String opName = msgContext.getAxisOperation().getName().getLocalPart();
+ AxisService service = msgContext.getAxisService();
+ String serviceName = service.getName();
+ AxisServiceGroup axisServiceGroup = (AxisServiceGroup)
service.getParent();
+ String groupName = axisServiceGroup.getServiceGroupName();
// We need to authenticate this call only if its calling the
MashupAdminService.
// We do not need to authenticate calls to the login and logout
operations.
- return (serviceName.equals(MashupConstants.MASHUP_ADMIN_SERVICEUT) ||
serviceName.equals(
- MashupConstants.MASHUP_ADMIN_SERVICEIC))&&
- !(opName.equals("login") || opName.equals("logout"));
+ return (MashupConstants.MASHUP_ADMIN_SERVICEGROUP.equals(groupName))&&
+ MashupConstants.MASHUP_LOGIN_SERVICEUT.equals(serviceName) ||
+ MashupConstants.MASHUP_LOGIN_SERVICEIC.equals(serviceName);
}
}
Modified: trunk/mashup/java/modules/admin/service/META-INF/services.xml
==============================================================================
--- trunk/mashup/java/modules/admin/service/META-INF/services.xml
(original)
+++ trunk/mashup/java/modules/admin/service/META-INF/services.xml Tue Jan
15 19:57:42 2008
@@ -15,14 +15,14 @@
-->
<serviceGroup name="wso2mashup-adminService">
- <service name="MashupAdminServiceUT" scope="transportsession">
+ <service name="MashupLoginServiceUT" scope="transportsession">
<Description>
This service holds the admin operations.
</Description>
<parameter
name="ServiceClass">org.wso2.mashup.admin.service.MashupAdminService</parameter>
<schema schemaNamespace="http://admin.mashup.wso2.org/xsd"/>
</service>
- <service name="MashupAdminServiceIC" scope="transportsession">
+ <service name="MashupLoginServiceIC" scope="transportsession">
<Description>
This service holds the admin operations.
</Description>
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/MashupConstants.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/MashupConstants.java
(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/MashupConstants.java
Tue Jan 15 19:57:42 2008
@@ -92,9 +92,9 @@
public static final String SELF_REGISTRATION_ENABLED =
"self_registration_enabled";
- public static final String MASHUP_ADMIN_SERVICE =
"wso2mashup-adminService";
- public static final String MASHUP_ADMIN_SERVICEUT =
"MashupAdminServiceUT";
- public static final String MASHUP_ADMIN_SERVICEIC = "MashupAdminServiceUT";
+ public static final String MASHUP_ADMIN_SERVICEGROUP =
"wso2mashup-adminService";
+ public static final String MASHUP_LOGIN_SERVICEUT = "MashupLoginServiceUT";
+ public static final String MASHUP_LOGIN_SERVICEIC = "MashupLoginServiceUT";
public static final String USER_LOGGED_IN = "UserLoggedIn";
public static final String INITIAL_SETUP_COMPLETE =
"initial_setup_complete";
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
==============================================================================
---
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
(original)
+++
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
Tue Jan 15 19:57:42 2008
@@ -67,7 +67,8 @@
}
SecurityScenarioConfigAdmin admin = new
SecurityScenarioConfigAdmin();
-
admin.assignUsersAndRolesAndKeyStores(MashupConstants.MASHUP_ADMIN_SERVICEUT,
null, "scenario7", new String [] {"wso2is.jks"}, "wso2is.jks",
+
admin.assignUsersAndRolesAndKeyStores(MashupConstants.MASHUP_LOGIN_SERVICEUT,
null, "scenario7",
+ new String [] {"wso2is.jks"}, "wso2is.jks",
new String[] { },
new String[] {
MashupConstants.MASHUP_USER_ROLE });
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
Tue Jan 15 19:57:42 2008
@@ -378,7 +378,7 @@
Options options = client.getOptions();
options.setAction("urn:login");
options.setTo(new EndpointReference("http://localhost:" +
serverManager.getHttpPort() +
- context.getContextRoot() + context.getServicePath() +
"/MashupAdminServiceUT/login"));
+ context.getContextRoot() + context.getServicePath() +
"/MashupLoginServiceUT/login"));
options.setUserName(username);
options.setPassword(password);
client.setOptions(options);
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev