Skip to content

Commit

Permalink
Better return.
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Nov 14, 2018
1 parent 728b27d commit 9323d49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Core/LTIX.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ public static function setupSession($needed=self::ALL, $session_object=null, $re
}

// Use returned data to check the validity of the incoming request

$raw_jwt = false;
$jwt = false;
if ( $LTI11 ) {
$valid = LTI::verifyKeyAndSecret($post['key'],$row['secret'],self::curPageUrl(), $request_data);

Expand Down Expand Up @@ -550,6 +551,9 @@ public static function setupSession($needed=self::ALL, $session_object=null, $re

// Just copy across
if ( U::get($post,'lti13_deeplink') ) $row['lti13_deeplink'] = $post['lti13_deeplink'];

self::wrapped_session_put($session_object, 'tsugi_jwt', $jwt);
// self::wrapped_session_put($session_object, 'tsugi_raw_jwt', $raw_jwt);
}

// Store the launch path
Expand Down
1 change: 1 addition & 0 deletions src/Util/LTI13.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
class LTI13 extends LTI {

const DEPLOYMENT_ID = "https://purl.imsglobal.org/spec/lti/claim/deployment_id";
const ROLES_CLAIM = "https://purl.imsglobal.org/spec/lti/claim/roles";
const NAMESANDROLES_CLAIM = "https://purl.imsglobal.org/spec/lti-nrps/claim/namesroleservice";
const ENDPOINT_CLAIM = "https://purl.imsglobal.org/spec/lti-ags/claim/endpoint";
Expand Down

0 comments on commit 9323d49

Please sign in to comment.