SimpleAuthenticationInfo
生活随笔
收集整理的这篇文章主要介绍了
SimpleAuthenticationInfo
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
public SimpleAuthenticationInfo(Object principal, Object hashedCredentials, ByteSource credentialsSalt, String realmName) {
this.principals = new SimplePrincipalCollection(principal, realmName);
this.credentials = hashedCredentials;
this.credentialsSalt = credentialsSalt;
}
realm中使用这个构造方法时,第一个参数principal传入的值和subject.getPrincipal()获取的值一致。
这里传入userEntity(实体),subject.getPrincipal()得到的是userEntity(实体);
这里传入username(字符串),subject.getPrincipal()得到的是字符串。
总结
以上是生活随笔为你收集整理的SimpleAuthenticationInfo的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Javascript基础--函数(Fun
- 下一篇: mysql group by 过滤字段