Skip to content

Commit 671bfc1

Browse files
committed
cleanup and upgrade
1 parent 868c754 commit 671bfc1

File tree

7 files changed

+24
-16
lines changed

7 files changed

+24
-16
lines changed

spring-security-basic-auth/pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@
8282
<dependency>
8383
<groupId>javax.servlet</groupId>
8484
<artifactId>javax.servlet-api</artifactId>
85-
<version>3.0.1</version>
85+
<version>${javax.servlet.version}</version>
8686
<scope>provided</scope>
8787
</dependency>
8888

8989
<dependency>
9090
<groupId>javax.servlet</groupId>
9191
<artifactId>jstl</artifactId>
92-
<version>1.2</version>
92+
<version>${jstl.version}</version>
9393
<scope>runtime</scope>
9494
</dependency>
9595

@@ -98,7 +98,7 @@
9898
<dependency>
9999
<groupId>com.google.guava</groupId>
100100
<artifactId>guava</artifactId>
101-
<version>14.0.1</version>
101+
<version>${guava.version}</version>
102102
</dependency>
103103

104104
<!-- logging -->
@@ -238,7 +238,9 @@
238238

239239
<!-- various -->
240240
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
241-
241+
<jstl.version>1.2</jstl.version>
242+
<javax.servlet.version>3.0.1</javax.servlet.version>
243+
242244
<!-- util -->
243245
<guava.version>19.0</guava.version>
244246
<commons-lang3.version>3.4</commons-lang3.version>

spring-security-mvc-custom/pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@
8787
<dependency>
8888
<groupId>javax.servlet</groupId>
8989
<artifactId>javax.servlet-api</artifactId>
90-
<version>3.0.1</version>
90+
<version>${javax.servlet.version}</version>
9191
<scope>provided</scope>
9292
</dependency>
9393

9494
<dependency>
9595
<groupId>javax.servlet</groupId>
9696
<artifactId>jstl</artifactId>
97-
<version>1.2</version>
97+
<version>${jstl.version}</version>
9898
<scope>runtime</scope>
9999
</dependency>
100100

@@ -243,7 +243,9 @@
243243

244244
<!-- various -->
245245
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
246-
246+
<javax.servlet.version>3.0.1</javax.servlet.version>
247+
<jstl.version>1.2</jstl.version>
248+
247249
<!-- util -->
248250
<guava.version>19.0</guava.version>
249251
<commons-lang3.version>3.4</commons-lang3.version>

spring-security-mvc-custom/src/main/resources/webSecurityConfig.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<intercept-url pattern="/login*" access="permitAll"/>
1313
<intercept-url pattern="/**" access="isAuthenticated()"/>
1414

15+
<csrf disabled="true"/>
16+
1517
<form-login login-page='/login.html' authentication-success-handler-ref="myAuthenticationSuccessHandler" authentication-failure-url="/login.html?error=true"/>
1618

1719
<logout delete-cookies="JSESSIONID"/>

spring-security-mvc-custom/src/main/webapp/WEB-INF/view/console.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<br/>
1717
</security:authorize>
1818

19-
<a href="<c:url value="/j_spring_security_logout" />">Logout</a>
19+
<a href="<c:url value="/logout" />">Logout</a>
2020

2121
</body>
2222
</html>

spring-security-mvc-custom/src/main/webapp/WEB-INF/view/homepage.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<br />
1717
</security:authorize>
1818

19-
<a href="<c:url value="/j_spring_security_logout" />">Logout</a>
19+
<a href="<c:url value="/logout" />">Logout</a>
2020

2121
</body>
2222
</html>

spring-security-mvc-custom/src/main/webapp/WEB-INF/view/login.jsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
<body>
55
<h1>Login</h1>
66

7-
<form name='f' action="j_spring_security_check" method='POST'>
7+
<form name='f' action="login" method='POST'>
88

99
<table>
1010
<tr>
1111
<td>User:</td>
12-
<td><input type='text' name='j_username' value=''></td>
12+
<td><input type='text' name='username' value=''></td>
1313
</tr>
1414
<tr>
1515
<td>Password:</td>
16-
<td><input type='password' name='j_password' /></td>
16+
<td><input type='password' name='password' /></td>
1717
</tr>
1818
<tr>
1919
<td>Remember Me:</td>
20-
<td><input type="checkbox" name="_spring_security_remember_me" /></td>
20+
<td><input type="checkbox" name="remember_me" /></td>
2121
</tr>
2222
<tr>
2323
<td><input name="submit" type="submit" value="submit" /></td>

spring-security-mvc-digest-auth/pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@
8282
<dependency>
8383
<groupId>javax.servlet</groupId>
8484
<artifactId>javax.servlet-api</artifactId>
85-
<version>3.0.1</version>
85+
<version>${javax.servlet.version}</version>
8686
<scope>provided</scope>
8787
</dependency>
8888

8989
<dependency>
9090
<groupId>javax.servlet</groupId>
9191
<artifactId>jstl</artifactId>
92-
<version>1.2</version>
92+
<version>${jstl.version}</version>
9393
<scope>runtime</scope>
9494
</dependency>
9595

@@ -238,7 +238,9 @@
238238

239239
<!-- various -->
240240
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
241-
241+
<jstl.version>1.2</jstl.version>
242+
<javax.servlet.version>3.0.1</javax.servlet.version>
243+
242244
<!-- util -->
243245
<guava.version>19.0</guava.version>
244246
<commons-lang3.version>3.4</commons-lang3.version>

0 commit comments

Comments
 (0)