shiro permission framework, log in and report the following error Authentication failed for token submission

Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - admin, rememberMe=false]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).
Reason:
I also encountered this error today. It is not a password verification error. I have a mabatis mapperxml配置文件写错(not a login-related mapper). Under analysis, when logging in, the login method will call our rewritten doGetAuthenticationInfo method, this method we will implement the login verification related methods written by dao (mine is Admin admin = this.accountService.findAdmin(username)) to transfer the login information deposit
SimpleAuthenticationInfo, is in this place, the project will load the relevant information we configured, for me, is because mabatis in the xml xml in the wrong configuration, the Admin admin = this.accountService.findAdmin (username) this method Although it has nothing to do with the wrong xml, an error will be reported.
Therefore, you should check whether your configuration files related to doGetAuthenticationInfo follow. You can try{currentUser.login(token)}
catch(AuthenticationException a){} and debug again after the exception is caught, and you can find out where the problem is.

Guess you like

Origin blog.csdn.net/weixin_45879810/article/details/110635647