[LON-CAPA-cvs] cvs: loncom /lti ltiutils.pm
raeburn
raeburn at source.lon-capa.org
Thu Jan 4 07:19:25 EST 2018
raeburn Thu Jan 4 12:19:25 2018 EDT
Modified files:
/loncom/lti ltiutils.pm
Log:
- Extract signature from string returned by &get_service_id() for comparison
with signature in the sourcedid received from an LTI provider.
Index: loncom/lti/ltiutils.pm
diff -u loncom/lti/ltiutils.pm:1.4 loncom/lti/ltiutils.pm:1.5
--- loncom/lti/ltiutils.pm:1.4 Thu Jan 4 12:09:42 2018
+++ loncom/lti/ltiutils.pm Thu Jan 4 12:19:25 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA LTI interactions
#
-# $Id: ltiutils.pm,v 1.4 2018/01/04 12:09:42 raeburn Exp $
+# $Id: ltiutils.pm,v 1.5 2018/01/04 12:19:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -286,7 +286,7 @@
my $expected_sig;
if ($context eq 'grade') {
my $uniqid = $digsymb.':::'.$diguser.':::'.$cdom.'_'.$cnum;
- $expected_sig = &get_service_id($secret,$uniqid);
+ $expected_sig = (split(/:::/,&get_service_id($secret,$uniqid)))[0];
if ($expected_sig eq $sigrec) {
return 1;
} else {
@@ -294,7 +294,7 @@
}
} elsif ($context eq 'roster') {
my $uniqid = $digsymb.':::'.$cdom.'_'.$cnum;
- $expected_sig = &get_service_id($secret,$uniqid);
+ $expected_sig = (split(/:::/,&get_service_id($secret,$uniqid)))[0];
if ($expected_sig eq $sigrec) {
return 1;
} else {
More information about the LON-CAPA-cvs
mailing list