Java EE 8 Security
Agregar la seguridad mediante Java EE 8 Security APi editar el archivo web.xml
Definir
<web-resource-collection>
<auth-contraint>
<security-role>
Crearemos tres roles para nuestro ejercicio: ADMINISTRADOR, AUDITOR, SECRETARIA
<!--
JAVA EE 8 API SECURITY
-->
<security-constraint>
<web-resource-collection>
<web-resource-name>Application pages</web-resource-name>
<url-pattern>/faces/pages/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>ADMINISTRADOR</role-name>
<role-name>AUDITOR</role-name>
<role-name>SECRETARIA</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>ADMINISTRADOR</role-name>
</security-role>
<security-role>
<role-name>AUDITOR</role-name>
</security-role>
<security-role>
<role-name>SECRETARIA</role-name>
</security-role>Archivo web.xml
Last updated
Was this helpful?