JSF Authentication

I am developing a Java EE application (JSF2 + richfaces + Facelets + Tomcat). What is the best way to authenticate using JSF? Or should I make my own?

+3
source share
8 answers

People usually choose between (not in a specific order):

JAAS (Java / Java EE Default Security Environment)
Spring Security
Custom Security

I never used Spring Security, but the documentation is huge, I gave up trying to do it once because of the time limit. JAAS has the advantages of being simple and working out of the box with Tomcat.

, JAAS.

, , , .

, ( ), , JAAS - , , Spring, .

+6

, , (CAS) . , . LDAP NTLM. CAS .

Java EE , JSF 1.2 2.0 j_security_check

, API Servlet 3.0 HttpServletRequest API.

+1

JBoss Seam EJB 3, Facelets, JSF . . , . , , . , Seam .

0

Seam Security, CDI Extension.

0

spring spring jsf1.2.

0

Apache Shiro, , .

0

- JSTL , . exmaple, , webapp/WEB-INF/templates/default.xhtml, :

<html...>
.
.
<h:body>
<c:if test="#{mbSecurity.validUser}">
.
. authenticated template sections goes here
.
</c:if>

<c:if test="#{not mbSecurity.validUser}">
   <ui:include src="/WEB-INF/inc/login-form.xhtml" />
</c:if>
</h:body>
</html>

: , , , .

0

Source: https://habr.com/ru/post/1765614/


All Articles