james viet wrote:
Now I would like write a class look like this to check in my app.
What is it you want to be able to do in this class that you can't do by using container configured security?
In the meantime, I can also point out the existence of javax.servlet.http.HttpServletRequest#login(java.lang.String, java.lang.String), which became available in JavaEE 6. This may help you accomplish your objective.
Thanks for your reply.
My mean is: when I login in app with user name, passowrd. It automatically uses configuration of
security-domain (encrypted password, compare with DB, ......).
That can be done with the request login method I suggested above.