异常详情:

在执行到自定义realm的doGetAuthenticationInfo方法时,抛出NullPointerException异常,异常信息为

Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - zhangsan, 
rememberMe=false]. Possible unexpected error?
(Typical or expected login exceptions should extend from AuthenticationException).

Shiro身份认证异常:Authentication failed for token submission

原因:

出现这个异常的原因很多,可以肯定不是因为密码错误,因为密码错误也不会在这一步抛出异常。

我这次遇到的是因为UserModel模型实体类没有实现序列化接口,即Serializable;实现这个接口后问题解决。

Shiro身份认证异常:Authentication failed for token submission

 

相关文章:

  • 2022-03-11
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2021-07-23
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2021-08-09
  • 2021-06-25
  • 2022-12-23
  • 2021-06-10
  • 2021-09-13
相关资源
相似解决方案