【问题标题】:How to get Authentication Service user account info in front-end? [duplicate]如何在前端获取身份验证服务用户帐户信息? [复制]
【发布时间】:2017-01-15 04:40:53
【问题描述】:

我正在 SCP 中构建一个 HTML5 应用程序,使用 Portal Service 来管理角色。后端开发人员要求我向他们提供角色信息(ID 或电子邮件)作为接口的输入(他们需要此身份验证信息)。如何获得?

是否提供任何前端 API 来获取这些信息?

【问题讨论】:

    标签: sapui5 saml-2.0 sap-fiori sap-business-technology-platform sap-cloud-identity-services


    【解决方案1】:

    用户 APIHCP 中提供了一些关于用户的详细信息。 要在您的 HTML5 应用程序中使用用户 API,请将路由添加到您的 neo-app.json 应用程序描述符文件,如下所示:

    "routes": [
       {
         "path": "/services/userapi", //application path to be forwarded
         "target": {
           "type": "service",
           "name": "userapi"
         }
      }
    ]
    

    上面定义的路由的示例 URL 如下所示:/services/userapi/currentUser

    示例响应可能返回以下用户数据:

    {
      "name": "p12345678",
      "firstName": "Jon",
      "lastName": "Snow",
      "email": "jon.snow@tina.com",
      "displayName": "Jon Snow (p12345678)"
    }
    

    More info here

    【讨论】:

    • 嗨,Sunil,我可以在 Cloud Foundry 的 FLP 中获取此信息吗?我应该在 xs-app.json 中添加这条路线,因为 cloud Foundry 中没有 neo-app.json 吗?
    • 嗨蒂娜,我不确定。我不了解云代工。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-12
    • 1970-01-01
    • 2014-10-03
    • 1970-01-01
    • 2019-01-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多