Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF authentication and authorization

What is the best way to go about implementing authentication and authorization for a JSF web application? Preferrably I'd still want to use container-based security, as I need to call EJBs that require the principal.

I realize form-based authentication is a major struggle with JSF, but can I perhaps use a PhaseListener or something similar together with programmatic logon to authenticate the user?

Any other methods I should rather have a look at?

like image 432
Zecrates Avatar asked Jul 27 '09 12:07

Zecrates


2 Answers

Try to check out the blog for using JAAS with JSF. This is the example of how to deploy the JAAS with JSF for authentication and authorization.

I hope it helps.

Tiger

like image 198
Tiger Avatar answered Nov 01 '22 05:11

Tiger


You can use the Spring Security framework, see instructions here http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/

like image 3
David Rabinowitz Avatar answered Nov 01 '22 06:11

David Rabinowitz