自定义realm
创建一个类,继承AuthorizingRealm->AuthenticatingRealm->CachingRealm->Realm
重写授权方法doGetAuthorizationInfo
重写认证方法doGetAuthenticationInfo
对象介绍
UsernamePasswordToken :对应shiro的token中有Principal和Credential
UsernamePasswordToken->>HostAuthenticationTOken->>AuthenticationTOken
SimpleAuthorizationInfo:代表用户角色权限信息
SimpleAuthenticationInfo:代表用户的认证信息
方法:
当用户登陆的时候会调用doGetAuthenticationInfo
当权限校验时doGetAuthorizationInfo
check