Author: prabath Date: Thu Jan 10 03:29:00 2008 New Revision: 12113 Log:
OpenID integration Added: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openid-infocard-submit.html trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidinfocardloggedin.jsp trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidloggedin.jsp Modified: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/index.html trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/infocard-submit.html 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 Jan 10 03:29:00 2008 @@ -1,30 +1,44 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Card Login</title> -</head> -<body> -<img src="images/logo.gif" /> - -<h2><a href="infocard-submit.html"><img border="0" src="images/infocard_46x32.png" />Login with your InfoCard</a></h2> -<br/> - - -<hr/> - -<form name="frm" id="frm" method="post" action="login.jsp"> - <input type="hidden" name="InfoCardSignin" value="Log in" /><br/> - <OBJECT type="application/x-informationCard" name="xmlToken"> - <PARAM Name="tokenType" - Value="urn:oasis:names:tc:SAML:1.0:assertion"> - - <PARAM Name="requiredClaims" - Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"> - <PARAM Name='optionalClaims' value='http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage'> - </OBJECT> - <input type="submit" name="submit" value="Login" /> - </form> - - -</body> -</html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Card Login</title> +</head> +<body> +<img src="images/logo.gif" /> + +<h2><a href="infocard-submit.html"><img border="0" src="images/infocard_46x32.png" />Login with your InfoCard</a></h2> + + +<form name="frm" id="frm" method="post" action="login.jsp"> + <input type="hidden" name="InfoCardSignin" value="Log in" /><br/> + <OBJECT type="application/x-informationCard" name="xmlToken"> + <PARAM Name="tokenType" + Value="urn:oasis:names:tc:SAML:1.0:assertion"> + + <PARAM Name="requiredClaims" + Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"> + <PARAM Name='optionalClaims' value='http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage'> + </OBJECT> + <input type="submit" name="submit" value="Login" /> + </form> +<hr/> + +<h2>Login with your OpenID</h2> + +<form name="frm" id="frm" method="post" action="https://localhost:12443/OpenIdSubmit.action?returnUrl=https://localhost:12443/javarp/openidloggedin.jsp"> + Enter Your OpenID Url: <input type="text" size=40 name="openIdUrl" /><br/><br/> + <input type="submit" name="submit" value="Login" /> +</form> + +<br/> + + +<hr/> + +<br/> + +<h2><a href="openid-infocard-submit.html">Login with your OpenID InfoCard</a></h2> + + +</body> +</html> Modified: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/infocard-submit.html ============================================================================== --- trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/infocard-submit.html (original) +++ trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/infocard-submit.html Thu Jan 10 03:29:00 2008 @@ -1,24 +1,24 @@ -<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -</head> -<body> - <form name="frm" id="frm" method="post" action="login.jsp"> - <input type="hidden" name="InfoCardSignin" value="Log in" /><br/> - <OBJECT type="application/x-informationCard" name="xmlToken"> - <PARAM Name="tokenType" - Value="urn:oasis:names:tc:SAML:1.0:assertion"> - - <PARAM Name="requiredClaims" - Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"> - <PARAM Name='optionalClaims' value='http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage'> - </OBJECT> - </form> - <script language="JavaScript" type="text/JavaScript"> - <!-- - document.frm.submit(); - --> - </script> -</body> +<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +</head> +<body> + <form name="frm" id="frm" method="post" action="login.jsp"> + <input type="hidden" name="InfoCardSignin" value="Log in" /><br/> + <OBJECT type="application/x-informationCard" name="xmlToken"> + <PARAM Name="tokenType" + Value="urn:oasis:names:tc:SAML:1.0:assertion"> + + <PARAM Name="requiredClaims" + Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier http://schema.openid.net/2007/05/claims/identifier"> + <PARAM Name='optionalClaims' value='http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage'> + </OBJECT> + </form> + <script language="JavaScript" type="text/JavaScript"> + <!-- + document.frm.submit(); + --> + </script> +</body> </html> \ No newline at end of file Added: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openid-infocard-submit.html ============================================================================== --- (empty file) +++ trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openid-infocard-submit.html Thu Jan 10 03:29:00 2008 @@ -0,0 +1,21 @@ +<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +</head> +<body> + <form name="frm" id="frm" method="post" action="openidinfocardloggedin.jsp"> + <input type="hidden" name="InfoCardSignin" value="Log in" /><br/> + <OBJECT type="application/x-informationCard" name="xmlToken"> + <PARAM Name="tokenType" Value="http://specs.openid.net/auth/2.0"> + <PARAM Name="requiredClaims" Value="http://schema.openid.net/2007/05/claims/identifier http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"> + <param name="optionalClaims" Value="http://axschema.org/namePerson/first http://axschema.org/contact/phone/default http://axschema.org/contact/postalAddress/home http://axschema.org/contact/city/home http://axschema.org/contact/postalCode/home http://axschema.org/contact/country/home http://axschema.org/contact/web/blog"> + </OBJECT> + </form> + <script language="JavaScript" type="text/JavaScript"> + <!-- + document.frm.submit(); + --> + </script> +</body> +</html> \ No newline at end of file Added: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidinfocardloggedin.jsp ============================================================================== --- (empty file) +++ trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidinfocardloggedin.jsp Thu Jan 10 03:29:00 2008 @@ -0,0 +1,104 @@ +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.relyingparty.TokenVerifierConstants"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.relyingparty.HTMLEncoder"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.IdentityConstants"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.openid.relyingparty.OpenIDConsumer "%> + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" +"http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> +</head> +<body> +<% +OpenIdConsumer consumer=OpenIdConsumer.getInstance(); +consumer.setInfocardSessionAttributes(request); + +%> + + +<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;"> + <tr> + + <table cellpadding="0" cellspacing="10" border="0" + + <tr> + <td valign="top" width="30%"> + <strong>Logged in Successfully...!</strong><br /> + </td> + </tr> + <% if (request.getAttribute("givenname") != null) { %> + <tr> + <td>GIven Name:</td> + <td><%=request.getAttribute("nickname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("nickname") != null) { %> + <tr> + <td>Nick Name:</td> + <td><%=request.getAttribute("nickname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("fullname") != null) { %> + <tr> + <td>Full Name:</td> + <td><%=request.getAttribute("fullname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("surname") != null) { %> + <tr> + <td>Surname:</td> + <td><%=request.getAttribute("surname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("email") != null) { %> + <tr> + <td>Email Address:</td> + <td><%=request.getAttribute("email")%></td> + </tr> + <%}%> + <% if (request.getAttribute("dob") != null) { %> + <tr> + <td>DOB:</td> + <td><%=request.getAttribute("dob")%></td> + </tr> + <%}%> + <% if (request.getAttribute("gender") != null) { %> + <tr> + <td>Gender:</td> + <td><%=request.getAttribute("gender")%></td> + </tr> + <%}%> + <% if (request.getAttribute("postcode") != null) { %> + <tr> + <td>Postcode:</td> + <td><%=request.getAttribute("postcode")%></td> + </tr> + <%}%> + <% if (request.getAttribute("country") != null) { %> + <tr> + <td>Country:</td> + <td><%=request.getAttribute("country")%></td> + </tr> + <%}%> + <% if (request.getAttribute("language") != null) { %> + <tr> + <td>Language:</td> + <td><%=request.getAttribute("language")%></td> + </tr> + <%}%> + <% if (request.getAttribute("timezone") != null) { %> + <tr> + <td>Timezone:</td> + <td><%=request.getAttribute("timezone")%></td> + </tr> + <%}%> + + </table> + </td> + </tr> +</table> + + +</body> + +</html> \ No newline at end of file Added: trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidloggedin.jsp ============================================================================== --- (empty file) +++ trunk/solutions/identity/modules/samples/servlet-filter/src/main/webapp/openidloggedin.jsp Thu Jan 10 03:29:00 2008 @@ -0,0 +1,92 @@ +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.relyingparty.TokenVerifierConstants"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.relyingparty.HTMLEncoder"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.IdentityConstants"%> +<[EMAIL PROTECTED] import="org.wso2.solutions.identity.openid.relyingparty.OpenIdConsumer "%> + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" +"http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> +</head> +<body> +<% +OpenIdConsumer consumer=OpenIdConsumer.getInstance(); +consumer.setSessionAttributes(request); + +%> + + +<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;"> + <tr> + + <table cellpadding="0" cellspacing="10" border="0" + + <tr> + <td valign="top" width="30%"> + <strong>Logged in Successfully...!</strong><br /> + </td> + </tr> + <% if (request.getAttribute("nickname") != null) { %> + <tr> + <td>Nick Name:</td> + <td><%=request.getAttribute("nickname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("fullname") != null) { %> + <tr> + <td>Full Name:</td> + <td><%=request.getAttribute("fullname")%></td> + </tr> + <%}%> + <% if (request.getAttribute("email") != null) { %> + <tr> + <td>Email Address:</td> + <td><%=request.getAttribute("email")%></td> + </tr> + <%}%> + <% if (request.getAttribute("dob") != null) { %> + <tr> + <td>DOB:</td> + <td><%=request.getAttribute("dob")%></td> + </tr> + <%}%> + <% if (request.getAttribute("gender") != null) { %> + <tr> + <td>Gender:</td> + <td><%=request.getAttribute("gender")%></td> + </tr> + <%}%> + <% if (request.getAttribute("postcode") != null) { %> + <tr> + <td>Postcode:</td> + <td><%=request.getAttribute("postcode")%></td> + </tr> + <%}%> + <% if (request.getAttribute("country") != null) { %> + <tr> + <td>Country:</td> + <td><%=request.getAttribute("country")%></td> + </tr> + <%}%> + <% if (request.getAttribute("language") != null) { %> + <tr> + <td>Language:</td> + <td><%=request.getAttribute("language")%></td> + </tr> + <%}%> + <% if (request.getAttribute("timezone") != null) { %> + <tr> + <td>Timezone:</td> + <td><%=request.getAttribute("timezone")%></td> + </tr> + <%}%> + + </table> + </td> + </tr> +</table> + + +</body> + +</html> \ No newline at end of file _______________________________________________ Identity-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/identity-dev
