【问题标题】:Invalid grant error on WSO2 IS using special characters in the password with grant_type=passwordWSO2 IS 上的无效授权错误在密码中使用特殊字符,grant_type=password
【发布时间】:2017-09-16 06:35:58
【问题描述】:

我有一个连接到 WSO2 以生成其访问令牌和刷新令牌的应用程序,但是当我在密码中使用特殊字符时,服务器会以无效授权错误回答

我用这个网址和邮递员一起测试它:

https://localhost:9443/oauth2/token?grant_type=password&username=XXXXX&password=123Abc$#

具有 OAuth 客户端密钥和秘密以及 Content-Type 的基本身份验证:application/x-www-form-urlencoded

答案是:

{
  "error_description": "Authentication failed for Ceiba2@carbon.super",
  "error": "invalid_grant"
}

有没有办法转义这些特殊字符?因为 WSO2 允许我直接从应用程序和使用其 SOAP 服务更改密码以使用特殊字符。

谢谢

【问题讨论】:

    标签: special-characters wso2is


    【解决方案1】:

    我解决了编码 url 字符的问题

    最终的网址是:

    https://localhost:9443/oauth2/token?grant_type=password&username=XXXXXX&password=123Abc%24%23

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-30
      • 1970-01-01
      • 2020-02-07
      • 2021-11-22
      • 2016-11-26
      • 1970-01-01
      相关资源
      最近更新 更多