Then, you can just override credentialsMatcher to return true at all times,
and you can pass any password you want as the second parameter.


> On Jan 27, 2016, at 2:50 PM, anumolumurali <[email protected]> wrote:
> 
> Thanks for quick reply!
> 
> Let me be more clear on my issue.
> 
> I want to skip the credentials parameter in SimpleAuthenticationInfo as my
> authentication is already done using my custom logic. 
> e.g.
> protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken
> token){
>       boolean isMatch = /passwordCheck/(token.getPassword(),password from 
> DB); 
> //Password from DB is Hashed, so we are using the different service to check
> the password.
>       if(isMatch){
>               return new SimpleAuthenticationInfo(token.getUserName(), 
> *password*,
> getName());
>       } 
>       throw new AuthenticationException("Invalid username/password
> combination!");
> }
> 
> If I skip the password in SimpleAuthenticationInfo shiro is just throwing
> exception for the authentication is failed.
> 
> 
> 
> --
> View this message in context: 
> http://shiro-user.582556.n2.nabble.com/Mutliple-realms-with-custom-Authentiction-tp7580911p7580917.html
> Sent from the Shiro User mailing list archive at Nabble.com.
> 

Reply via email to