Merged
Conversation
This allows a LTI user to be masqueraded as which is always available.
There was a problem hiding this comment.
Pull request overview
This PR adds support for masquerading as LTI (Learning Tools Interoperability) users in the Canvas API client library, allowing API calls to be made on behalf of LTI 1.3 users.
Changes:
- Added new
readAsLtiUser()andwriteAsLtiUser()methods to enable LTI user masquerading - Implemented LTI masquerading using the
lti_1_3_id:prefix in API calls - Added unit tests demonstrating LTI masquerading functionality for both read and write operations
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/edu/ksu/canvas/constants/CanvasConstants.java | Added constant MASQUERADE_LTI_USER for LTI user masquerading |
| src/main/java/edu/ksu/canvas/interfaces/CanvasReader.java | Added readAsLtiUser() method to reader interface |
| src/main/java/edu/ksu/canvas/interfaces/CanvasWriter.java | Added writeAsLtiUser() method to writer interface |
| src/main/java/edu/ksu/canvas/impl/BaseImpl.java | Implemented LTI masquerading logic with lti_1_3_id: prefix handling |
| src/test/java/edu/ksu/canvas/tests/user/UserRetrieverUTest.java | Added test for reading as LTI user |
| src/test/java/edu/ksu/canvas/tests/course/UserManagerUTest.java | Added test for writing as LTI user |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/edu/ksu/canvas/tests/user/UserRetrieverUTest.java
Outdated
Show resolved
Hide resolved
nicholaswilson100
approved these changes
Feb 2, 2026
sebastianchristopher
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows a LTI user to be masqueraded as which is always available.