Spring isAuthenticated和isFullyAuthenticated之间的差异
我正在努力学习spring安全性,我有一个问题:Spring isAuthenticated和isFullyAuthenticated之间的差异,spring,spring-security,Spring,Spring Security,我正在努力学习spring安全性,我有一个问题: 在spring security中isAuthenticated和isFullyAuthenticated之间有什么区别 isAuthenticated() Returns true if the user is not anonymous isFullyAuthenticated() Returns true if the user is not an anonymous or a remember-me user 实际上,我认
在spring security中isAuthenticated和isFullyAuthenticated之间有什么区别
isAuthenticated() Returns true if the user is not anonymous
isFullyAuthenticated() Returns true if the user is not an anonymous or a remember-me user
实际上,我认为他们在文档中解释得更好:
isAuthenticated() Returns true if the user is not anonymous
isFullyAuthenticated() Returns true if the user is not an anonymous or a remember-me user
将检查当前的身份验证
,以确定主体是否具有特定的身份验证级别
“完全”认证选项表示用户已完全认证
(即为假
并且为false
如果委托人是
已通过“记住我”进行身份验证或已完全通过身份验证
如果主体通过身份验证,则“匿名”将授予访问权限
记住我,或者匿名,或者通过完全认证
其中提到:
isAuthenticated()
-如果用户不是匿名的,则返回true
isfullyaauthenticated()
-如果用户不是匿名用户或记住我的用户,则返回true
所以,如果用户不记得我的特性,就没有区别了?请更正,没有其他区别,您只需使用isAuthenticated()即可。