需要用户凭证来获取访问令牌.请调用非静音的acquireTokenWithResource方法. ADALiOS问题 [英] The user credentials are need to obtain access token. Please call the non-silent acquireTokenWithResource methods. ADALiOS issue

查看:121
本文介绍了需要用户凭证来获取访问令牌.请调用非静音的acquireTokenWithResource方法. ADALiOS问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的快速项目中,我正在使用会聚dev分支源代码.我在项目中手动添加了ADALiOS文件.当前从刷新令牌中检索访问令牌是一个问题.

In my swift project, I am using convergence dev branch source code. I have added ADALiOS files manually in my project. Currently retrieving access token from refresh token is a problem.

直到上周我的项目一切正常,但是当我在Mondat(即2016年3月20日)打开项目时,我不知道我的应用程序如何以及为什么无法将访问令牌保存在本地缓存中.因此,每当我尝试静默获取访问令牌时,它都无法从本地缓存中检索它.对于每个电话,我都会收到以下错误消息

Till last week my project was working all fine but as I opened my project on Mondat i.e. 20th March, 2016, I don't know how and why my app is not able to save access token in local cache. So whenever I tried to get access token silently it is unable to retrieve it from local cache. For every call I am getting following error

"参数"cacheItem.scopes"无效.值:(空)."和

"需要用户凭据才能获取访问令牌.请调用非静默的acquireTokenWithResource方法."

从我这方面来说,我没有做任何更改.我可以看到新版本已在收敛分支中完成.请建议我如何解决该问题,也可以有人建议我是否因为我正面临此问题而进行服务器端更改?

From my side I haven't done any changes. I am able to see that new release has been done in convergence branch. Please suggest me how could I solve it also can someone suggest me whether server side changes has also been done or not because of which I am facing this issue?

对于相同的项目设置,我们也在Android应用程序和网页中使用adalios.但是这些家伙并没有遇到任何此类问题,只有iOS团队正在面对它.

For the same project settings we are using adalios in our android app and web page also. But those guys are not going through any such issue only iOS team is facing it.

如果有人有任何想法,请帮助我.

If anyone has any idea please help me.

推荐答案

阅读完整的ADALiOS文件结构后,我知道有2个imp Web请求正在执行,首先是获取身份验证代码,在此调用中选择了策略"存在于URL中.我的访问令牌到期后会进行其他调用,因此要获取新的访问令牌,它会传递刷新令牌.特别是在这次电话会议中,我注意到URL中未提供任何策略.因此,我手动对其进行了一些更改,并在URL中添加了策略.之后,我的应用程序运行良好,现在无需再次登录.

After reading full ADALiOS file structure I got to know that there are 2 imp web requests going, first is to get auth code, in this call selected "policy" is present in URL. Other call is made after my access token has expired, so to get new access token it is passing refresh token. Particularly in this call I noticed that no policy has been provided in URL. So manually I did some changes to it and added policy in the URL. After that my app is working all good and now I don't have to login again and again.

这篇关于需要用户凭证来获取访问令牌.请调用非静音的acquireTokenWithResource方法. ADALiOS问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆