Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
3c503869
Commit
3c503869
authored
Mar 25, 2015
by
Rob Baily
Committed by
Phillip Webb
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix logout in sample secure web applications
Fixes gh-1536
parent
a36d1e2e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
6 deletions
+13
-6
SampleWebSecureCustomApplication.java
...e/web/secure/custom/SampleWebSecureCustomApplication.java
+1
-1
home.html
...-web-secure-custom/src/main/resources/templates/home.html
+3
-1
SampleWebSecureCustomApplication.java
...ple/web/secure/jdbc/SampleWebSecureCustomApplication.java
+1
-1
home.html
...le-web-secure-jdbc/src/main/resources/templates/home.html
+3
-1
SampleWebSecureApplication.java
...in/java/sample/web/secure/SampleWebSecureApplication.java
+2
-1
home.html
...-sample-web-secure/src/main/resources/templates/home.html
+3
-1
No files found.
spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java
View file @
3c503869
...
...
@@ -76,7 +76,7 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
().
antMatchers
(
"/css/**"
).
permitAll
().
anyRequest
()
.
fullyAuthenticated
().
and
().
formLogin
().
loginPage
(
"/login"
)
.
failureUrl
(
"/login?error"
).
permitAll
();
.
failureUrl
(
"/login?error"
).
permitAll
()
.
and
().
logout
().
permitAll
()
;
}
@Override
...
...
spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/resources/templates/home.html
View file @
3c503869
...
...
@@ -13,7 +13,6 @@
Plain
</a>
<ul
class=
"nav"
>
<li><a
th:href=
"@{/}"
href=
"home.html"
>
Home
</a></li>
<li><a
th:href=
"@{/logout}"
href=
"logout"
>
Logout
</a></li>
</ul>
</div>
</div>
...
...
@@ -21,6 +20,9 @@
<div
th:text=
"${message}"
>
Fake content
</div>
<div
id=
"created"
th:text=
"${#dates.format(date)}"
>
July 11,
2012 2:17:16 PM CDT
</div>
<form
th:action=
"@{/logout}"
method=
"post"
>
<input
type=
"submit"
value=
"Sign Out"
/>
</form>
</div>
</body>
</html>
spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/java/sample/web/secure/jdbc/SampleWebSecureCustomApplication.java
View file @
3c503869
...
...
@@ -81,7 +81,7 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
().
antMatchers
(
"/css/**"
).
permitAll
().
anyRequest
()
.
fullyAuthenticated
().
and
().
formLogin
().
loginPage
(
"/login"
)
.
failureUrl
(
"/login?error"
).
permitAll
();
.
failureUrl
(
"/login?error"
).
permitAll
()
.
and
().
logout
().
permitAll
()
;
}
@Override
...
...
spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/main/resources/templates/home.html
View file @
3c503869
...
...
@@ -13,7 +13,6 @@
Plain
</a>
<ul
class=
"nav"
>
<li><a
th:href=
"@{/}"
href=
"home.html"
>
Home
</a></li>
<li><a
th:href=
"@{/logout}"
href=
"logout"
>
Logout
</a></li>
</ul>
</div>
</div>
...
...
@@ -21,6 +20,9 @@
<div
th:text=
"${message}"
>
Fake content
</div>
<div
id=
"created"
th:text=
"${#dates.format(date)}"
>
July 11,
2012 2:17:16 PM CDT
</div>
<form
th:action=
"@{/logout}"
method=
"post"
>
<input
type=
"submit"
value=
"Sign Out"
/>
</form>
</div>
</body>
</html>
spring-boot-samples/spring-boot-sample-web-secure/src/main/java/sample/web/secure/SampleWebSecureApplication.java
View file @
3c503869
...
...
@@ -71,7 +71,8 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter {
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
().
anyRequest
().
fullyAuthenticated
().
and
().
formLogin
()
.
loginPage
(
"/login"
).
failureUrl
(
"/login?error"
).
permitAll
();
.
loginPage
(
"/login"
).
failureUrl
(
"/login?error"
).
permitAll
().
and
()
.
logout
().
permitAll
();
}
@Override
...
...
spring-boot-samples/spring-boot-sample-web-secure/src/main/resources/templates/home.html
View file @
3c503869
...
...
@@ -13,7 +13,6 @@
Plain
</a>
<ul
class=
"nav"
>
<li><a
th:href=
"@{/}"
href=
"home.html"
>
Home
</a></li>
<li><a
th:href=
"@{/logout}"
href=
"logout"
>
Logout
</a></li>
</ul>
</div>
</div>
...
...
@@ -21,6 +20,9 @@
<div
th:text=
"${message}"
>
Fake content
</div>
<div
id=
"created"
th:text=
"${#dates.format(date)}"
>
July 11,
2012 2:17:16 PM CDT
</div>
<form
th:action=
"@{/logout}"
method=
"post"
>
<input
type=
"submit"
value=
"Sign Out"
/>
</form>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment