0

我在使用 WSO2 IS 中的 TOTP 管理服务时遇到问题(https://docs.wso2.com/display/ISCONNECTORS/Using+the+TOTP+API#UsingtheTOTPAPI-EnableTOTPEnableTOTP)。我发送以下请求:

curl -i -X POST -H 'Content-Type:application/x-www-form-urlencoded' -H "Authorization:Basic YWRtaW46TGF0aW51czAx" https://192.168.0.238:9443/services/TOTPAdminService/resetTOTP -k -d 'username=admin'

并得到这个错误:

C:\Users\Administrador>curl -i -X POST -H 'Content-Type:application/x-www-form-urlencoded'  -H "Authorization:Basic YWRtaW46TGF0aW51czAx" https://192.168.0.238:
9443/services/TOTPAdminService/resetTOTP -k -d 'username=admin'
HTTP/1.1 500 Internal Server Error
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Set-Cookie: JSESSIONID=6BC764F5BB95F534DA74528AF92572BA; Path=/; Secure; HttpOnl
y
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Vary: Accept-Encoding
Date: Wed, 25 Apr 2018 21:39:56 GMT
Connection: close
Server: WSO2 Carbon Server
<faultstring>Exception occurred while trying to invoke service method resetTOTP<
/faultstring>

TOTP 配置正确,因为我可以手动启用和禁用它。请帮我!

4

1 回答 1

0

好吧,我为此找到的解决方法是使用 SoapUI,添加 TOTP 的 wsdl ( https://localhost:9443/services/TOTPAdminService?wsdl )。在那里您可以启用和禁用 TOTP,并刷新并获取密钥。还要考虑需要授权,它可以是用户和密码的基本授权。希望这可以帮助某人:)

于 2018-04-26T14:08:27.783 回答