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
4412285c
Commit
4412285c
authored
Nov 18, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish Spring Session WebFlux sample
Closes gh-11055
parent
a8c027ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
application.properties
...session-webflux/src/main/resources/application.properties
+0
-0
SampleSessionWebFluxApplicationTests.java
.../sample/session/SampleSessionWebFluxApplicationTests.java
+1
-5
No files found.
spring-boot-samples/spring-boot-sample-session-webflux/src/main/resources/application.properties
deleted
100644 → 0
View file @
a8c027ba
spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java
View file @
4412285c
...
...
@@ -51,20 +51,16 @@ public class SampleSessionWebFluxApplicationTests {
public
void
userDefinedMappingsSecureByDefault
()
throws
Exception
{
WebClient
webClient
=
this
.
webClientBuilder
.
baseUrl
(
"http://localhost:"
+
this
.
port
+
"/"
).
build
();
ClientResponse
response
=
webClient
.
get
().
header
(
"Authorization"
,
getBasicAuth
())
.
exchange
().
block
();
assertThat
(
response
.
statusCode
()).
isEqualTo
(
HttpStatus
.
OK
);
ResponseCookie
sessionCookie
=
response
.
cookies
().
getFirst
(
"SESSION"
);
String
sessionId
=
response
.
bodyToMono
(
String
.
class
).
block
();
response
=
webClient
.
get
().
cookie
(
"SESSION"
,
sessionCookie
.
getValue
()).
exchange
()
response
=
webClient
.
get
().
cookie
(
"SESSION"
,
sessionCookie
.
getValue
()).
exchange
()
.
block
();
assertThat
(
response
.
statusCode
()).
isEqualTo
(
HttpStatus
.
OK
);
assertThat
(
response
.
bodyToMono
(
String
.
class
).
block
()).
isEqualTo
(
sessionId
);
Thread
.
sleep
(
1000
);
response
=
webClient
.
get
().
cookie
(
"SESSION"
,
sessionCookie
.
getValue
()).
exchange
()
.
block
();
assertThat
(
response
.
statusCode
()).
isEqualTo
(
HttpStatus
.
UNAUTHORIZED
);
...
...
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