Index: lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java,v diff -u -r1.32.2.2 -r1.32.2.3 --- lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 5 Jul 2007 01:29:40 -0000 1.32.2.2 +++ lams_central/src/java/org/lamsfoundation/lams/web/IndexAction.java 9 Jul 2007 07:20:02 -0000 1.32.2.3 @@ -282,7 +282,10 @@ String url = null; if(contains(roles,Role.ROLE_LEARNER)) { if (state.equals(OrganisationState.ACTIVE)) { - url = "javascript:openFedLearner("+lessonFed.getExtLessonId()+", '"+fedServerUrl+"')"; + url = "javascript:openFedLearner(" + lessonFed.getExtLessonId() + ", " + + "'" + getURLNoPath(fedServerUrl) + "', " + + "'" + Configuration.get(ConfigurationKeys.SHIB_IDP_SSO_HANDLER) + "', " + + "'" + Configuration.get(ConfigurationKeys.SHIB_IDP_ENTITY_ID) + "')"; } else if (state.equals(OrganisationState.ARCHIVED)) { lessonLinks.add(new IndexLinkBean("label.export.portfolio","javascript:openExportPortfolio("+lessonFed.getExtLessonId()+")")); } @@ -334,6 +337,14 @@ } return orgBean; } + + // given http://idp.example.org/lams, returns http://idp.example.org + private String getURLNoPath(String url) { + if (url!=null && url.length()>8) { + return url.substring(0, url.indexOf('/', 7)); + } + return url; + } private boolean isInLesson(User user, Lesson lesson) { return lesson.getLessonClass().isStaffMember(user)||lesson.getLessonClass().getLearners().contains(user); Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_central/src/java/org/lamsfoundation/lams/web/ShibHomeServlet.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_central/web/includes/javascript/openUrls.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/openUrls.js,v diff -u -r1.20.2.2 -r1.20.2.3 --- lams_central/web/includes/javascript/openUrls.js 5 Jul 2007 01:29:40 -0000 1.20.2.2 +++ lams_central/web/includes/javascript/openUrls.js 9 Jul 2007 07:20:02 -0000 1.20.2.3 @@ -163,22 +163,27 @@ } } - function openFedLearner( lessonId, fedServer ) + function openFedLearner( lessonId, fedServer, handler, entityId ) { + var target = fedServer+'/lams/shibhome?method=learner&lessonID='+lessonId; + var shire = fedServer+'/Shibboleth.sso/SAML/POST'; + var providerId = entityId; + var url = handler+'?target='+target+'&shire='+shire+'&providerId='+providerId; + if(isMac) { - learnWin = window.open(fedServer+'/home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes'); + learnWin = window.open(url,'lWindow','width=796,height=570,resizable,status=yes'); } else { if(learnWin && !learnWin.closed ) { - learnWin.location = fedServer+'/home.do?method=learner&lessonID='+lessonId; + learnWin.location = url; learnWin.focus(); } else { - learnWin = window.open(fedServer+'/home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes'); + learnWin = window.open(url,'lWindow','width=796,height=570,resizable,status=yes'); } } } Index: lams_common/db/sql/insert_lams_unix_config_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/insert_lams_unix_config_data.sql,v diff -u -r1.6.2.1 -r1.6.2.2 --- lams_common/db/sql/insert_lams_unix_config_data.sql 7 Jun 2007 01:28:36 -0000 1.6.2.1 +++ lams_common/db/sql/insert_lams_unix_config_data.sql 9 Jul 2007 07:20:03 -0000 1.6.2.2 @@ -36,5 +36,7 @@ insert into lams_configuration (config_key, config_value) values ('ShibAttrFname','LAMS-Login'); insert into lams_configuration (config_key, config_value) values ('ShibAttrLname','LAMS-Login'); insert into lams_configuration (config_key, config_value) values ('ShibAttrRoles','LAMS-Roles'); -insert into lams_configuration (config_key, config_value) values ('FedRegistryURL','http://localhost'); -insert into lams_configuration (config_key, config_value) values ('FedKey','blah'); \ No newline at end of file +insert into lams_configuration (config_key, config_value) values ('FedRegistryURL','http://192.168.111.55:8081'); +insert into lams_configuration (config_key, config_value) values ('FedKey','blah'); +insert into lams_configuration (config_key, config_value) values ('ShibIdPSSOHandler','https://olive.lamsfoundation.org/shibboleth-idp/SSO'); +insert into lams_configuration (config_key, config_value) values ('ShibIdPEntityId','https://olive.lamsfoundation.org/shibboleth'); \ No newline at end of file Index: lams_common/db/sql/insert_lams_windows_config_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/insert_lams_windows_config_data.sql,v diff -u -r1.3.2.1 -r1.3.2.2 --- lams_common/db/sql/insert_lams_windows_config_data.sql 7 Jun 2007 01:28:36 -0000 1.3.2.1 +++ lams_common/db/sql/insert_lams_windows_config_data.sql 9 Jul 2007 07:20:03 -0000 1.3.2.2 @@ -36,5 +36,7 @@ insert into lams_configuration (config_key, config_value) values ('ShibAttrFname','LAMS-Login'); insert into lams_configuration (config_key, config_value) values ('ShibAttrLname','LAMS-Login'); insert into lams_configuration (config_key, config_value) values ('ShibAttrRoles','LAMS-Roles'); -insert into lams_configuration (config_key, config_value) values ('FedRegistryURL','http://localhost'); -insert into lams_configuration (config_key, config_value) values ('FedKey','blah'); \ No newline at end of file +insert into lams_configuration (config_key, config_value) values ('FedRegistryURL','http://192.168.111.55:8081'); +insert into lams_configuration (config_key, config_value) values ('FedKey','blah'); +insert into lams_configuration (config_key, config_value) values ('ShibIdPSSOHandler','https://olive.lamsfoundation.org/shibboleth-idp/SSO'); +insert into lams_configuration (config_key, config_value) values ('ShibIdPEntityId','https://olive.lamsfoundation.org/shibboleth'); \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java,v diff -u -r1.23.2.3 -r1.23.2.4 --- lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java 7 Jun 2007 01:28:47 -0000 1.23.2.3 +++ lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java 9 Jul 2007 07:20:03 -0000 1.23.2.4 @@ -146,4 +146,8 @@ public static String FED_KEY = "FedKey"; public static String ALLOW_EDIT_ON_FLY = "AllowLiveEdit"; + + public static String SHIB_IDP_SSO_HANDLER = "ShibIdPSSOHandler"; + + public static String SHIB_IDP_ENTITY_ID = "ShibIdPEntityId"; } \ No newline at end of file