我已经将一直使用WSO2作为API管理器的Angular应用程序进行了docker化。完成配置后,我能够成功运行该应用程序,并能够访问所有现有的api。唯一的问题是当我尝试使用oath2 / token api来执行客户的登录操作时出现的。即使使用相同的代码更早地(在dockerization之前)执行身份验证,也没有任何问题,现在我因为
{
"error": "invalid_grant",
"error_description": "Provided Authorization Grant is invalid"
}
用于登录的令牌生成API:
https://<myapplicationurl>:9443/oauth2/token
尝试使用用户名'devtest7@mailinator.com'登录时,docker控制台出现错误:
注意事项:
我尝试了在stackoverflow上看到的解决方案,但并没有解决我的问题。有人可以帮忙吗?
Thanks for everyone who commented and tried to figure out the solution for the issue i mentioned. I got the resolution for the issue . As i tried multiple times to login by doing permutations and combinations in configurations, authentication was blocked for me. As a reason, i couldn't login and generate access token . I was able to resolve it by changing a flag in identity.xml file inside IS . Changed the UserOperationEventListener enabling from 'true' to 'false' .
Before:
<EventListener enable="true" name="org.wso2.carbon.identity.governance.listener.IdentityMgtEventListener" orderId="95" type="org.wso2.carbon.user.core.listener.UserOperationEventListener"/>
After:
<EventListener enable="false" name="org.wso2.carbon.identity.governance.listener.IdentityMgtEventListener" orderId="95" type="org.wso2.carbon.user.core.listener.UserOperationEventListener"/>
This change allowed me to block the invalid authentication check. We are anyway adding that check from our code side.