【发布时间】:2014-04-09 23:14:47
【问题描述】:
我正在编写一个 Cordova 应用程序,我想从插件访问它的 HTTP 安全 cookie。我想加密/禁用它,直到用户输入有效的密码。
非常感谢所有帮助。谢谢。
【问题讨论】:
标签: android http cordova webview session-cookies
我正在编写一个 Cordova 应用程序,我想从插件访问它的 HTTP 安全 cookie。我想加密/禁用它,直到用户输入有效的密码。
非常感谢所有帮助。谢谢。
【问题讨论】:
标签: android http cordova webview session-cookies
我的做法是启用/禁用整个应用程序的 cookie:
CookieManager mCookieManager = CookieManager.getInstance();
CookieSyncManager.createInstance(this);
mCookieManager.setAcceptCookie(false); //disables cookies for the WebView until the user enters a correct pin
if(getUsersPin()) { //getUsersPin() gets the pin from the user
mCookieManager.setAcceptCookie(true);
}
【讨论】: