繁体   English   中英

WSO2 Identity Server 6.0 找不到用于检索和更新挑战问题的 API

[英]WSO2 Identity Server 6.0 unable to find API for retrieve and update challenge questions

1.我们在/_system/config/repository/components/org.wso2.carbon.identity.mgt/questionCollection中添加安全问题。 我们正在尝试在挑战问题 API https://is.docs.Z8995A8D9DC109CB7F2C89344FB20E6,4FZ-api-able/#latest下使用 /me/challenges GET 方法检索那些检索它们并使用 GET 和 PUT API 更新它们。 有什么方法可以检索在此目录下添加的这些问题/_system/config/repository/components/org.wso2.carbon.identity.mgt/questionCollection 并更新它们?

根据描述,您似乎想要管理存储在服务器中的问题集及其问题。

使用以下 REST API 检索存储在/_system/config/identity/questionCollection位置的问题集并更新这些问题集。

https://github.com/wso2/identity-api-server/blob/master/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.挑战.v1/src/main/resources/challenge.yaml

获取按问题集 ID 分组的挑战问题:

curl --location --request GET 'https://localhost:9443/api/server/v1/challenges' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

更新一组问题:例如:PUT 请求替换challengeQuestion2 集中的所有问题

curl --location --request PUT 'https://localhost:9443/api/server/v1/challenges/challengeQuestion2' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data-raw '[
    {
        "locale": "en_US",
        "question": "Name of the hospital where you were born ?",
        "questionId": "question2"
    },
    {
        "locale": "en_US",
        "question": "Model of your first car ?",
        "questionId": "question1"
    }
]'

例如:PATCH 请求将一个问题添加到challengeQuestion2 集

curl --location --request PATCH 'https://localhost:9443/api/server/v1/challenges/challengeQuestion2' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data-raw '{
  "operation": "ADD",
  "challengeQuestion": {
    "question": "what is your school",
    "locale": "en_US",
    "questionId": "question9"
  }
}'

https://is.docs.wso2.com/en/latest/apis/challenge-rest-api/#/ this REST API is used to manage the challenge questions answers. /me/challenges/{user-id}/challenges API 用于列出用户可以回答的可用问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM