我对 Servlet 3.0 的身份验证功能有疑问:
在 Servlet v3 中使用此代码:
log.info(""+request.getUserPrincipal());
log.info(""+request.getAuthType());
log.info("===^===");
request.logout() ;
log.info(""+request.getUserPrincipal());
log.info(""+request.getAuthType());
request.authenticate(response) ;
log.info("===v===");
log.info(""+request.getUserPrincipal());
log.info(""+request.getAuthType());
由于该功能,我总是希望看到用户名/登录窗口。logout()
相反,它似乎是一种“缓存”机制,可以重新填充凭据并取消我的注销...
行政
基本的
===^===
无效的
无效的
===v===
行政
基本的
这是我的firefox的问题,还是我在Servlet代码中缺少的东西?