shiro碰到的问题 does not support authentication token

编程入门 行业动态 更新时间:2024-10-07 10:20:52

shiro碰到的问题 does not <a href=https://www.elefans.com/category/jswz/34/1768979.html style=support authentication token"/>

shiro碰到的问题 does not support authentication token

shiro碰到的问题 does not support authentication token

 

自己写了一个Ream,配置到了SecurityManager中,但是验证的时候,一直报这个错。

查了半天,没进展,最后还是发现自己粗心,代码的问题。

每一个Ream都有一个supports方法,用于检测是否支持此Token, 而我在该函数中,默认的采用了return false;

false 当然不支持了~

最后修改为了:public class ShiroRealm extends CasRealm 重写这个supports方法

@Overridepublic boolean supports(AuthenticationToken token) {// TODO Auto-generated method stubreturn token instanceof UsernamePasswordToken;}

更多推荐

shiro碰到的问题 does not support authentication token

本文发布于:2024-02-11 22:33:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1683963.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:support   shiro   token   authentication

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!