Authenticaton Method for Desire2Learn REST API vs SOAP

后端 未结 1 1954
悲哀的现实
悲哀的现实 2020-12-12 03:57

I\'m hoping someone could enlighten me on the way authentication works with the new D2L REST API. From my reading and playing with the \"GetStarted\" example code it seems

相关标签:
1条回答
  • 2020-12-12 04:23

    An extra manual login is not required and there are two alternatives that I have seen used in this scenario. Both utilize the fact that the Valence authentication system uses keys and signatures. By using signatures rather than sending tokens even plaintext apis are not subject to session hijacking and as a result keys can safely remain valid for a long time. This period is typically set to 30 days, but, when applications like the one you describe are in use it is best to have no timeout. You can contact support about adjusting this timeout for your server. (Keys are still reset if passwords are reset or if they are explicitly revoked).

    With long lived keys the following scenarios are possible, without the application directly receiving or storing the users password (key storage still needs to be done securely):

    Instructor account context: If the application workflow already requires an instructor to activate or configure the process the userid and userkey for that instructor can be retained during the intial session and later used to submit the grades. This does not require any special accounts or elevated priveleges, but, only applies if the workflow already involves the instructor context.

    Utility account context: If the application does not involve an instructor, it is possible to create a utility account that has permissions to update grades. This is often the approach already in use with D2LWS, but, with an extra step. In this scenario, the keys for the utility account are established out of band (for example the getting started sample (http://docs.valence.desire2learn.com/samples/gettingStarted.html) will display the keys). Alternately an install or config type process can be created that automatically records the keys from the utility account. After these keys are recorded no additional interactive sessions are required.

    0 讨论(0)
提交回复
热议问题