Spring security tag lib
To do Spring security Client Integration, we will be decorating our existing JSP pages with Spring security tag library.
1. Add the spring tag-lib
below code at the top of our existing JSP ( home.jsp from Spring MVC tutorial )
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %>
The URI doesn't download, it's contained within the JAR.
There are three tags that are very important for the purpose of this tutorial to discuss.
authorise : Used to determine whether the contents within this element should be evaluated or not.
authentication: Used primarily to gain access to the object that represents the current logged in user
accesscontrollist: This is used when working with access controls or which are commonly known as “akles”.
2. Lets add the Spring tag lib dependency
<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-taglibs</artifactId> <version>4.1.0.RELEASE</version> </dependency>