Can Desire2Learn APIs be used from inside a D2L widget? Will the user get prompted for credentials?
问题:
回答1:
Yes the APIs work from widget. No the user won't be prompted for credentials.
Widgets are blocks of HTML code that can be embedded in different areas of the Desire2Learn UI (org home page and course home page). Widgets are one of two main ways of extending the UI of Desire2Learn (along with "External Learning Tools" which are LTI links typically added to courses). They are achieved by configuring a small block of html. For most developers of nontrivial widgets this will end up just being an iframe connecting to the web application (and in a blended solution sometimes the widget iframe will connect to the web application as an LTI link) .
Widgets will typically want to display their application content specific to the user that is viewing the page. Widgets can identify the user by immediately attempting API auth back to the calling server. Because the widget is being called from with in a session, this process will not prompt the user for credentials. At this point the application has the valence userid and key needed to perform API calls (such as "whoami") that will let the application identify the user and make other calls (for example showing grades or other information retrieved from the LMS) or to just correlate the user to data specific to the widget.