SimpleAuthenticationInfo
生活随笔
收集整理的這篇文章主要介紹了
SimpleAuthenticationInfo
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
public SimpleAuthenticationInfo(Object principal, Object hashedCredentials, ByteSource credentialsSalt, String realmName) {
this.principals = new SimplePrincipalCollection(principal, realmName);
this.credentials = hashedCredentials;
this.credentialsSalt = credentialsSalt;
}
realm中使用這個構(gòu)造方法時,第一個參數(shù)principal傳入的值和subject.getPrincipal()獲取的值一致。
這里傳入userEntity(實體),subject.getPrincipal()得到的是userEntity(實體);
這里傳入username(字符串),subject.getPrincipal()得到的是字符串。
總結(jié)
以上是生活随笔為你收集整理的SimpleAuthenticationInfo的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Javascript基础--函数(Fun
- 下一篇: mysql group by 过滤字段