- 论坛徽章:
- 0
|
Appfuse Version 1.9.3
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter
这段配置中key
AnonymousAuthenticationToken auth = new AnonymousAuthenticationToken(key, userAttribute.getPassword(),
userAttribute.getAuthorities());
其中
public AnonymousAuthenticationToken(String key, Object principal, GrantedAuthority[] authorities) {
super(authorities);
if ((key == null) || ("".equals(key)) || (principal == null) || "".equals(principal) || (authorities == null)
|| (authorities.length == 0)) {
throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
}
this.keyHash = key.hashCode();
this.principal = principal;
setAuthenticated(true);
}
这个key 做了什么???
还可以猜到给这些用户一个ROLE_ANONYMOUS角色
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/19271/showart_146642.html |
|