-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor LTI11 source #41
Conversation
@yuvipanda this is the second PR related to #39. Once we merge this one I'll update #40 based on an agreed structure. By the way, adding |
This looks good too! What do you think about keeping |
Good idea on the alias. I'll push and update with that change. |
@yuvipanda the requested changes have been pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes, + merge conflict resolution - otherwise LGTM!
ltiauthenticator/lti11/validator.py
Outdated
from collections import OrderedDict | ||
|
||
|
||
class LTILaunchValidator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTI11LaunchValidator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuvipanda this is a class I created as an abstraction to validate the LTI 1.1 requests since some are required and some optional and wanted to offer end users the option of fine tuning their own validations. I would be glad to remove this though if it's noisy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 1.3 use the same validation logic? If so, then we can leave it as is! Otherwise just wanted a rename.
Thank you for going through this with me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, but we can rename it to something else if you'd like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I did not know that! If it's using the same validation logic, we can leave it as is. Thank you for the explanation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the Launch
part in the class name is due to how the LTI 1.1 specification refers to logins as "Launch Requests". With LTI 1.3 the term changed to "Login Initiation Requests" so that it's more in line with OIDC/OAuth2 but we kept using "...Launch..." with LTI 1.3. We were planning to refactor the class name from LTI13LaunchValidator
to LTI13LoginInitiationValidator
for clarity but haven't gotten around to it.
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
@yuvipanda I pushed the requested changes and added more tests (mostly for the validator). If possible, we would like to submit one more PR before tackling #39 so we update the logic for the LTI 1.1 validator so that it's more consistent with the LTI 1.3 validator logic. |
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
AWESOME! Thanks, @jgwerner :) |
Related to #38 #39