Skip to content
Snippets Groups Projects
Commit ecb4f3fc authored by Florian Gnaegi - frentix GmbH's avatar Florian Gnaegi - frentix GmbH
Browse files

OO-566 implement lis_person_sourcedid to map to shib user id

parent e8d67bbf
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,7 @@ import org.olat.core.id.Identity; ...@@ -49,6 +49,7 @@ import org.olat.core.id.Identity;
import org.olat.core.id.Roles; import org.olat.core.id.Roles;
import org.olat.core.id.User; import org.olat.core.id.User;
import org.olat.core.id.UserConstants; import org.olat.core.id.UserConstants;
import org.olat.core.util.StringHelper;
import org.olat.core.util.WebappHelper; import org.olat.core.util.WebappHelper;
import org.olat.course.nodes.BasicLTICourseNode; import org.olat.course.nodes.BasicLTICourseNode;
import org.olat.course.run.environment.CourseEnvironment; import org.olat.course.run.environment.CourseEnvironment;
...@@ -202,6 +203,14 @@ public class LTIRunController extends BasicController { ...@@ -202,6 +203,14 @@ public class LTIRunController extends BasicController {
setProperty(props, "resource_link_title", courseNode.getShortTitle()); setProperty(props, "resource_link_title", courseNode.getShortTitle());
setProperty(props, "resource_link_description", courseNode.getLongTitle()); setProperty(props, "resource_link_description", courseNode.getLongTitle());
setProperty(props, "user_id", u.getKey() + ""); setProperty(props, "user_id", u.getKey() + "");
// Use the shibboleth ID as person source identificator
String personSourceId = (String)ureq.getUserSession().getEntry("shibuid");
if (!StringHelper.containsNonWhitespace(personSourceId)) {
// fallback to the serverDomainName:identityId
personSourceId = Settings.getServerconfig("server_fqdn") + ":" + ident.getKey();
}
setProperty(props, "lis_person_sourcedid", personSourceId);
setProperty(props, "launch_presentation_locale", loc.toString()); setProperty(props, "launch_presentation_locale", loc.toString());
setProperty(props, "launch_presentation_document_target", "iframe"); setProperty(props, "launch_presentation_document_target", "iframe");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment