+
+

+
+
Login Using OpenID
+
+ <%
+ if(request.getParameter("signin") != null && blacklisted == true && error == false){
+ %>
+
+
+ Sorry, that OpenID provider is not part of the trusted list. Please try one of the following:
+ <%
+ for(int i=0; i");
+ }
+ %>
+
+ <%
+ } else if (error == true) {
+ %>
+
+ <%=errorMessage %>
+
+
+ <%
+ }
+ %>
+
+
+ Login here using your personal OpenID URL. For example: someone.yahoo.com
+
+
+ If you have not done this before, you will be taken to a registration page after you have been authenticated through your OpenID provider.
+
+
+ Don't have an OpenID? Go
+ get
+ one.
+
+
+ <%
+ if(loggedInAs != null && ret != null && ret.equals("yes"))
+ {
+ // We have authentication, construct login request
+ String loginRequestURL = LAMS_SERVER_URL + "/openid/LoginUsingOpenId?";
+ //loginRequestURL += "&uid=" + URLEncoder.encode(loggedInAs, "UTF8");
+ loginRequestURL += "&method=none";
+ loginRequestURL += "&ts=" + timestamp;
+ loginRequestURL += "&sid=" + LAMS_SERVER_ID;
+ loginRequestURL += "&hash=" + hash;
+ loginRequestURL += "&courseid=" + URLEncoder.encode(courseID, "UTF8");
+ loginRequestURL += "&courseName=" + URLEncoder.encode(courseName, "UTF8");
+ loginRequestURL += "&country=" + GROUP_COUNTRY_ISO_CODE;
+ loginRequestURL += "&lang=" + GROUP_LANG_ISO_CODE;
+ loginRequestURL += "&requestSrc=¬ifyCloseURL=&lsid=";
+ response.sendRedirect(loginRequestURL);
+ }
+ %>
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_openid/web/register_openid.jsp
===================================================================
diff -u
--- lams_openid/web/register_openid.jsp (revision 0)
+++ lams_openid/web/register_openid.jsp (revision 29546ca4b5a3f8426cd68af3e9022cf57f36037e)
@@ -0,0 +1,144 @@
+
+<%@ include file="config.jsp" %>
+<%@ page import="org.apache.axis.client.Call" %>
+<%@ page import="org.apache.axis.client.Service" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.Date" %>
+<%@ page import="org.lamsfoundation.lams.util.HashUtil" %>
+<%@ page import="org.lamsfoundation.lams.util.Emailer" %>
+<%@ page import="org.lamsfoundation.lams.util.Configuration" %>
+<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %>
+
+
+
+<%
+ String userID = request.getParameter("openid_url");
+ String timestamp = "" + new Date().getTime();
+ String method = "register";
+ String plaintext = timestamp + userID + method + LAMS_SERVER_ID + LAMS_SERVER_KEY;
+ String hash = HashUtil.sha1(plaintext);
+ String courseID = (ADD_TO_GROUP) ? GROUP_ID : "";
+ String loginRequestURL = LAMS_SERVER_URL + "/LoginRequest";
+%>
+
+
+
+