celtic-project / LTI-PHP

PHP class library for building LTI integrations
GNU Lesser General Public License v3.0
48 stars 38 forks source link

[Question] How is the user id compiled #19

Closed alexvanniel closed 3 years ago

alexvanniel commented 3 years ago

As per this http://www.imsglobal.org/selecting-user-Id-lti documentation I recently read, it appears that there are 4 possible choices on how a user Id is created. Is this a choice that has already been made in the library of is this left to the developer implementing this library?

spvickers commented 3 years ago

For an LTI tool implementaton, the library will use whatever ID is passed in the user_id parameter. For an LTI Platform implementation, the library will pass whatever value is used to create the user_id parameter. That is, the library does not generate any of the values of LTI message parameters; it merely processes those which are created by the platform (or tool) code.

alexvanniel commented 3 years ago

So a tool provider gets this user Id passed on and can then decide to do something with the user Id and consumer of resource link id? In other words, a platform is responsible for the user Id and not the tool provider. "Thus, if a course has 5 links to the tool provider, a user following each of these links will have 5 separate user accounts created in the tool provider." This is something the platform decides then and not the tool provider?

Op zo 12 sep. 2021 12:55 schreef Stephen Vickers @.***>:

For an LTI tool implementaton, the library will use whatever ID is passed in the user_id parameter. For an LTI Platform implementation, the library will pass whatever value is used to create the user_id parameter. That is, the library does not generate any of the values of LTI message parameters; it merely processes those which are created by the platform (or tool) code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/celtic-project/LTI-PHP/issues/19#issuecomment-917612024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6EULBPTQWQJBHEVEQR4ZLUBSBL7ANCNFSM5D365PCA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

spvickers commented 3 years ago

A tool can choose to do whatever it likes with the data it receives. All the LTI spec guarantees is that the value of the user_id parameter passed in a launch message will be a unique identifier (within the scope of the platform) of the user making the connection. Some tools may not need to know the identity of the user, in which case they can ignore this value; others will, in which case they can use the value as needed to prepare content or activities specific to the user. It is up to the tool as to whether it treats the same user ID coming from multiple LTI links as the same user within the tool, or keeps their activity separate for each link. The user_id parameter merely allows tools to make such choices.