From 18140ed3b7a895f988ffb4e0ebb9e9ed9109036b Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 10 Jul 2020 18:24:55 -0400 Subject: [PATCH] normalize course label for lti 13 Signed-off-by: Greg --- src/illumidesk/authenticators/authenticator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/illumidesk/authenticators/authenticator.py b/src/illumidesk/authenticators/authenticator.py index 402ddcdd..b8ce67a8 100644 --- a/src/illumidesk/authenticators/authenticator.py +++ b/src/illumidesk/authenticators/authenticator.py @@ -334,7 +334,9 @@ async def authenticate( # noqa: C901 self.log.debug('Decoded JWT is %s' % jwt_decoded) if validator.validate_launch_request(jwt_decoded): - course_id = jwt_decoded['https://purl.imsglobal.org/spec/lti/claim/context']['label'] + course_id = lti_utils.normalize_name_for_containers( + jwt_decoded['https://purl.imsglobal.org/spec/lti/claim/context']['label'] + ) self.log.debug('Normalized course label is %s' % course_id) username = '' if 'email' in jwt_decoded.keys() and jwt_decoded.get('email'):