2

我刚刚开始使用 D2L 并且遇到了问题。

在“入门”页面上,我已经完成了前三个步骤:

1) 从 D2L 获取 App Key/ID 对 - 我已收到 App ID 和 App Key

2) 在您的主机 LMS 中创建一个测试帐户 - 我创建了一个具有管理员角色的新用户帐户用于测试

3) 选择要使用的客户端库 - 我正在使用 PHP SDK

4) 使用您的 LMS 进行身份验证 - 这是我遇到麻烦的地方。


当我使用入门示例时: http ://samples.valence.desire2learn.com/samples/GettingStartedSample/

并输入我的主机、应用程序 ID 和应用程序密钥并点击“验证”按钮,我收到“此应用程序未在此 LMS 实例上授权。请您的管理员授权此应用程序”错误。

我是我的 D2L 主机的管理员,但我不确定如何授权我自己的应用程序。

我尝试了以下方法:

  • 导航到“管理可扩展性”页面,因为这是 D2L 说我的应用程序应该位于的位置,但它不存在。
  • 在“DOME”页面下启用 API (d2l.Security.Api.EnableApi) 无效。

我究竟做错了什么?

4

1 回答 1

0

Based on your question and comments, there were two issues here:

  • First is that the list of App ID/Key pairs appropriate for your LMS get regularly fetched by your LMS from the D2L KeyTool service. The schedule for this fetching is once a day; accordingly, if the scheduled task isn't set up, or if your LMS isn't identifying itself properly to the KeyTool service, or if time hasn't yet elapsed after key granting to the next scheduled run of the task, the App won't yet be in your LMS' Manage Extensibility list. It sounds like you no longer have that issue.

  • Second is that the Valence Learning Framework APIs' authentication process (requesting and retrieving a set of user tokens for an LMS user) requires several LMS features to be properly set up: (a) the LMS must be configured to support Deep Linking, (b) the LMS must be set up to handle the ?target= parameter on incoming client URL requests, and curate that parameter throughout the user authentication process.

    In cases where your LMS is not doing the user authentication but depending upon another, third-party IDP (like Shibboleth), any ?target= parameter passed into the login process must be taken care of by the IDP and properly handed back to the LMS after user authentication. In a situation where you have multiple redirections occurring during user authentication, this can involve successive generation of a target parameter, and each generation must re-URL-encode the previous request URL in its entirety (like sticking an envelope inside another envelope, inside yet another envelope).

If your LMS is not properly configured to support these two points, which you might not notice during other operations, then client calls to the Learning Framework APIs won't work because the calling client won't be able to fetch back a set of user tokens.

To solve the second of these issues, you may have to contact D2L's Customer Support desk -- they can verify, and adjust as necessary, the LMS configuration part of this authentication chain. If you're integrating your LMS with other third-party IDP components not administered or deployed by D2L, then you might also need to adjust their configurations: D2L can likely advise on what needs to be done there (curate the target parameter on URls), but cannot adjust the configuration for you in those cases.

于 2013-06-03T13:36:59.073 回答