| | |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.User; |
| | | import com.yuanchu.limslaboratory.shiro.JwtToken; |
| | | import com.yuanchu.limslaboratory.shiro.utils.JwtCredentialsMatcher; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import org.apache.shiro.authc.*; |
| | | import org.apache.shiro.authc.credential.CredentialsMatcher; |
| | | import org.apache.shiro.authz.AuthorizationInfo; |
| | | import org.apache.shiro.authz.SimpleAuthorizationInfo; |
| | | import org.apache.shiro.realm.AuthorizingRealm; |
| | |
| | | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { |
| | | SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); |
| | | return info; |
| | | } |
| | | |
| | | @Override |
| | | public void setCredentialsMatcher(CredentialsMatcher credentialsMatcher) { |
| | | // 设置加密算法 |
| | | CredentialsMatcher jwtCredentialsMatcher = new JwtCredentialsMatcher(); |
| | | super.setCredentialsMatcher(jwtCredentialsMatcher); |
| | | } |
| | | } |