Apache Shiro身份验证自定义

时间:2016-06-27 11:29:52

标签: java security java-ee spring-security shiro

如何在Apache Shiro中自定义身份验证逻辑?在Spring Security中,我在AuthenticationManager中的“authenticate()”方法中编写了自定义逻辑:

public Authentication authenticate(Authentication auth) { ... }

有没有办法在Apache Shiro中做同样的事情?

1 个答案:

答案 0 :(得分:1)

以下是Shiro的authentication sequencecustomizable realm authentication的概述。

根据您想要做的事情,您自己实施的CredentialsMatcher可能是您正在寻找的钩子?您需要自定义哪些部分的详细答案取决于您的实际身份验证方案。