简体   繁体   English

如何在iOS ADAL库中清除缓存

[英]How to clear cache in iOS ADAL library

I have integrated ADAL library in my iOS application to authenticate with WAAD accounts. 我在我的iOS应用程序中集成了ADAL库,以便使用WAAD帐户进行身份验证。 After receiving the accessToken then the login screen (of ADAL) automatically gets disappear. 收到accessToken后,登录屏幕(ADAL)会自动消失。 Now if I try to call same login code to login with different user then it does not showing any fresh login screen and it was automatically getting logged in with previous user and giving me new accessToken. 现在,如果我尝试调用相同的登录代码来登录不同的用户,那么它不会显示任何新的登录屏幕,它会自动登录以前的用户并给我新的accessToken。 How can I erase cache of previous logged in user. 如何擦除先前登录用户的缓存。 I used below code to clear cache but no use of it. 我使用下面的代码清除缓存但没有使用它。

  [authContext.tokenCacheStore removeAll]; // This method is no more available. Getting error for removeAll method. 
  [authContext.tokenCacheStore removeAllWithError:&error]; // It does not clear cache.

Is there any way to clear cache or to display login screen? 有没有办法清除缓存或显示登录界面? please help me. 请帮我。 Thanks in advance. 提前致谢。

Cache removal means deleting of tokens from the keychain. 缓存删除意味着从密钥链中删除令牌。 It has no impact on the cookies in the webview. 它对webview中的cookie没有影响。 You should use peomptbehavior.always flag to ensure that the user is prompted for password at login time. 您应该使用peomptbehavior.always标志来确保在登录时提示用户输入密码。

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

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