<%@ include file="config.jsp" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-lams" prefix="lams" %> <%@ page import="org.verisign.joid.consumer.OpenIdFilter" %> <%@ page import="org.verisign.joid.util.UrlUtils" %> <%@ page import="org.lamsfoundation.lams.util.HashUtil" %> <%@ page import="org.lamsfoundation.lams.util.Configuration" %> <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> <%@ page import="java.util.Date" %> <%@ page import="java.net.URLEncoder" %> <%= Configuration.getAsBoolean(ConfigurationKeys.LDAP_ENCRYPT_PASSWORD_FROM_BROWSER) %> <% boolean blacklisted = true; boolean error = false; String errorMessage = ""; String ret = request.getParameter("return"); String userID = request.getParameter("openid_url"); String loggedInAs = OpenIdFilter.getCurrentUser(session); String timestamp = "" + new Date().getTime(); String method = "none"; String plaintext = timestamp + loggedInAs + method + LAMS_SERVER_ID + LAMS_SERVER_KEY; String hash = HashUtil.sha1(plaintext); String courseID = (ADD_TO_GROUP) ? GROUP_ID : ""; String courseName = (ADD_TO_GROUP) ? GROUP_NAME : ""; String returnTo = UrlUtils.getBaseUrl(request) + "?return=yes"; try { if (request.getParameter("signin") != null) { if (!userID.startsWith("http:")) { userID = "http://" + userID; } String provider = userID.substring(userID.indexOf(".") +1, userID.length()); for(int i=0; i OpenID Login - LAMS :: Learning Activity Management System


 

<% 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 %>

<% } %>

LAMS - Learning Activity Management System

<%try{%> /www/news.html <%}catch(Exception e){}%>

Version <%= Configuration.get(ConfigurationKeys.VERSION) %>

Login

Username:

Password:

 Or login/sign-up using OpenID

Login here using your personal OpenID URL. For example: someone.myopenid.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); } %>
Login with your OpenID URL:

Click your OpenID provider below and/or enter your OpenID in the field above: