Author: channa Date: Sat May 31 15:01:20 2008 New Revision: 17714 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17714
Log: Using context path in infocard login to prevent login errors when deployed in a non-root context. MASHUP-819. Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/IdentityHandler.java Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java?rev=17714&r1=17713&r2=17714&view=diff ============================================================================== --- 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 Sat May 31 15:01:20 2008 @@ -535,7 +535,8 @@ * @return * @throws MashupFault */ - public static String login(String identifier, String cookieString) throws MashupFault { + public static String login(String identifier, String cookieString, String contextPath) throws + MashupFault { Parameter parameter = null; AxisConfiguration configuration = null; try { @@ -552,8 +553,7 @@ Options options = client.getOptions(); options.setAction("urn:login"); options.setTo(new EndpointReference("http://localhost:" + serverManager.getHttpPort() + - context.getContextRoot() + context.getServicePath() + - "/MashupLoginServiceIC/login")); + contextPath + "/" + context.getServicePath() + "/MashupLoginServiceIC/login")); options.setProperty(HTTPConstants.COOKIE_STRING, "JSESSIONID=" + cookieString); options.setManageSession(true); client.setOptions(options); Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/IdentityHandler.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/IdentityHandler.java?rev=17714&r1=17713&r2=17714&view=diff ============================================================================== --- trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/IdentityHandler.java (original) +++ trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/identity/IdentityHandler.java Sat May 31 15:01:20 2008 @@ -75,7 +75,8 @@ String identifier = (String) (MashupConstants.INFOCARD.equals(authMethod) ? request.getAttribute(IdentityConstants.CLAIM_PPID) : request.getAttribute(IdentityConstants.OpenId.OPENID_IDENTIFIER)); - String userName = MashupUtils.login(identifier, session.getId()); + String userName = MashupUtils.login(identifier, session.getId(), + request.getContextPath()); UserRegistry userRegistry = RegistryUtils.createUserRegistry(userName, embeddedRegistry); request.getSession().setAttribute(MashupConstants.USER_REGISTRY, userRegistry); _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
