Author: prabath
Date: Thu Feb 14 00:58:47 2008
New Revision: 13741

Log:

javarp samples modified

Modified:
   
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/index.html
   
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidsubmit.jsp

Modified: 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/index.html
==============================================================================
--- 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/index.html
  (original)
+++ 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/index.html
  Thu Feb 14 00:58:47 2008
@@ -25,7 +25,7 @@
 
 <h2>Login with your OpenID</h2>
 
-<form name="frm" id="frm" method="post" 
action="https://localhost:12443/javarp/openidsubmit.jsp?returnUrl=https://localhost:12443/javarp/openidloggedin.jsp";>
  
+<form name="frm" id="frm" method="post" 
action="openidsubmit.jsp?returnUrl=https://localhost:12443/javarp/openidloggedin.jsp";>
  
                Enter Your OpenID Url:&nbsp;&nbsp;<input type="text" size=40 
name="openIdUrl"  /><br/><br/>
              <input type="submit" name="submit" value="Login" />   
 </form>

Modified: 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidsubmit.jsp
==============================================================================
--- 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidsubmit.jsp
    (original)
+++ 
trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidsubmit.jsp
    Thu Feb 14 00:58:47 2008
@@ -4,6 +4,7 @@
 <[EMAIL PROTECTED] 
import="org.wso2.solutions.identity.openid.relyingparty.OpenIDAuthenticationRequest"%>
 <[EMAIL PROTECTED] 
import="org.wso2.solutions.identity.openid.relyingparty.OpenIDConsumer"%>
 <[EMAIL PROTECTED] 
import="org.wso2.solutions.identity.relyingparty.RelyingPartyException"%>
+<[EMAIL PROTECTED] import="org.wso2.utils.ServerConfiguration"%>
 
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
@@ -21,6 +22,17 @@
                openIDAuthRequest.setReponse(response);
                openIDAuthRequest.setRequest(request);
                
openIDAuthRequest.setOpenIDUrl((String)request.getParameter("openIdUrl"));
+
+                       ServerConfiguration serverConfig = null;
+               String host = null;
+               String httpsPort = null;
+
+               serverConfig = ServerConfiguration.getInstance();
+               host = serverConfig.getFirstProperty("HostName");
+               httpsPort = serverConfig.getFirstProperty("Ports.HTTPS");
+            
+               openIDAuthRequest.setReturnUrl("https://"; + host + ":" + 
httpsPort + "/" + "javarp/openidloggedin.jsp");
+
                
OpenIDConsumer.getInstance().doOpenIDAuthentication(openIDAuthRequest);
                }
                catch(RelyingPartyException e)

_______________________________________________
Identity-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/identity-dev

Reply via email to