-
Giovanni Cimolin da Silva authored
This commit adds support for the LTI 1.3 Access token endpoint, as detailed in the IMS Security Framework. The token is generated using the consumer's private key (stored in the XBlock) after validating the message sent by the LTI Tool using it's public key. Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
Giovanni Cimolin da Silva authoredThis commit adds support for the LTI 1.3 Access token endpoint, as detailed in the IMS Security Framework. The token is generated using the consumer's private key (stored in the XBlock) after validating the message sent by the LTI Tool using it's public key. Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
constants.py 1.38 KiB
"""
LTI 1.3 Constants definition file
This includes the LTI Base message, OAuth2 scopes, and
lists of required and optional parameters required for
LTI message generation and validation.
"""
LTI_BASE_MESSAGE = {
# Claim type: fixed key with value `LtiResourceLinkRequest`
# http://www.imsglobal.org/spec/lti/v1p3/#message-type-claim
"https://purl.imsglobal.org/spec/lti/claim/message_type": "LtiResourceLinkRequest",
# LTI Claim version
# http://www.imsglobal.org/spec/lti/v1p3/#lti-version-claim
"https://purl.imsglobal.org/spec/lti/claim/version": "1.3.0",
}
LTI_1P3_ROLE_MAP = {
'staff': [
'http://purl.imsglobal.org/vocab/lis/v2/system/person#Administrator',
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor',
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student',
],
'instructor': [
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor',
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student'
],
'student': [
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student'
],
'guest': [
'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student'
],
}
LTI_1P3_ACCESS_TOKEN_REQUIRED_CLAIMS = set([
"grant_type",
"client_assertion_type",
"client_assertion",
"scope",
])
LTI_1P3_ACCESS_TOKEN_SCOPES = []