错误1:org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [cn.itsource.crm.shiro.util.CrmToken - 061HqmnI0EJ1lg28fwmI0jFrnI0Hqmnt, rememberMe=false]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).
错误提示我们,自定义的异常应该继承AuthenticationException,而我们继承的是:
public class WechatBindingException extends RuntimeException {
}
修改为如下所示后,错误解决
public class WechatBindingException extends AuthenticationException {
}
错误2:org.apache.shiro.authc.AuthenticationException: Authentication token of type [class cn.itsource.crm.shiro.util.CrmToken] could not be authenticated by any configured realms. Please ensure that at least one realm can authenticate these tokens.