wrap your call to the web service inside the credential matcher associated
with your realm.
https://shiro.apache.org/static/1.2.2/apidocs/org/apache/shiro/authc/credential/CredentialsMatcher.html

in your credential matcher class if webservice returns 200, then return
true. otherwise return false.

in your realm doGetAuthenticationInfo method, always return a
SimpleAuthenticationInfo.




On 19 February 2014 13:19, yagofp8 <[email protected]> wrote:

> Maybe I didn't explain really well. I will try to do it again.
>
> I need to authenticate the users that are going to use a webapp. The only
> way that I can authenticate a user is by using his/her username and
> password
> to access to a web service and see the response. If the response is with an
> error 401 then something was incorrect.
> So... I have implemented a class that does that but I don't know how to
> integrate it with Shiro. I know that there are other ways to do that, but I
> can only use what we have now to authenticate the users.
>
> I guess that is possible to implement a class and configure Shiro to use it
> to do that.
>
> Thank you for your help!
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Rest-Service-for-authentication-tp7579660p7579674.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply via email to