0

我正在尝试在我的 Web 应用程序中使用 Apache 晕厥进行身份验证。

谁能告诉我这样做的步骤。

到目前为止,我已经完成了安装。Syncope、Syncope-console 和 Syncope-enduser 应用程序已启动并在 tomcat 服务器中运行。

4

1 回答 1

1

Apache Syncope 2.0.2 的方法是这样的:

  1. 注册用户(通过 POST http://admin@pass /syncope/rest/users,发送 JSON UserTO 等)或自我注册(或多或少相同,但用户/自我,并且必须是匿名的(没有管理员@pass)。这将使您获得带有 KEY 的 UserTO,以便在其他 API 中使用。
  2. 注册后,将 GET 与 users/self 一起使用,包括 Basic Http Auth 用户+密码。(curl -u user:pass 可以用作示例。)这将为您提供一个带有可用于其他 API 的密钥的 UserTO。
  3. 将 UserTO 保存在 Session 中并继续进行身份验证。将包括权利。

查看 Swagger UI 或 JSON (http://:/syncope/swagger || syncope/rest/swagger.json 了解详细信息。

我推荐使用 swagger-client NPM 包来使用这个 REST api。

于 2017-03-20T01:53:15.630 回答