Skip to content

Commit 6225d59

Browse files
committed
Add an LTI 1.3 debug log in the case that the JWT fails to decode on a launch request.
In this case the LTIAuthenError stash value is set, but that error is never shown anywhere because the course ID was not determined and the authen verify method is never called. So this information goes to the abyss and the debug log abrubtly terminates (see https://forums.openwebwork.org/mod/forum/discuss.php?d=8749 for what this debug log looks like). So this pull request always debug logs it in this case. There is not enough information to even determine if LTI debugging is enabled for the course (which the request failed to determine), so it has to be the more general debug logging facility. This may help in resolving the issues that are occuring with the cases such as those in the above mentioned forum post and https://forums.openwebwork.org/mod/forum/discuss.php?d=8738#p22228.
1 parent 75974fd commit 6225d59

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/WeBWorK/ContentGenerator/LTIAdvantage.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ sub launch ($c) {
161161
$c->stash->{lti_jwt_claims}{'https://purl.imsglobal.org/spec/lti/claim/context'}{id}
162162
]
163163
];
164+
} elsif ($c->stash->{LTIAuthenError}) {
165+
debug($c->stash->{LTIAuthenError});
164166
}
165167
return $c->render(
166168
'ContentGenerator/LTI/content_item_selection_error',

0 commit comments

Comments
 (0)