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
8e16dfc9
Commit
8e16dfc9
authored
Nov 01, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
f15cb7a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
SecurityAutoConfigurationTests.java
...utoconfigure/security/SecurityAutoConfigurationTests.java
+12
-10
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
View file @
8e16dfc9
...
@@ -16,11 +16,6 @@
...
@@ -16,11 +16,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
security
;
package
org
.
springframework
.
boot
.
autoconfigure
.
security
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
...
@@ -58,6 +53,11 @@ import org.springframework.security.web.FilterChainProxy;
...
@@ -58,6 +53,11 @@ import org.springframework.security.web.FilterChainProxy;
import
org.springframework.security.web.SecurityFilterChain
;
import
org.springframework.security.web.SecurityFilterChain
;
import
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
;
import
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
/**
/**
* Tests for {@link SecurityAutoConfiguration}.
* Tests for {@link SecurityAutoConfiguration}.
*
*
...
@@ -291,21 +291,23 @@ public class SecurityAutoConfigurationTests {
...
@@ -291,21 +291,23 @@ public class SecurityAutoConfigurationTests {
}
}
@Configuration
@Configuration
protected
static
class
WorkaroundSecurityCustomizer
extends
WebSecurityConfigurerAdapter
{
protected
static
class
WorkaroundSecurityCustomizer
extends
WebSecurityConfigurerAdapter
{
@Autowired
@Autowired
private
AuthenticationManagerBuilder
builder
;
private
AuthenticationManagerBuilder
builder
;
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
AuthenticationManager
authenticationManager
;
private
AuthenticationManager
authenticationManager
;
@Override
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
authenticationManager
=
new
AuthenticationManager
()
{
this
.
authenticationManager
=
new
AuthenticationManager
()
{
@Override
@Override
public
Authentication
authenticate
(
Authentication
authentication
)
public
Authentication
authenticate
(
Authentication
authentication
)
throws
AuthenticationException
{
throws
AuthenticationException
{
return
builder
.
getOrBuild
().
authenticate
(
authentication
);
return
WorkaroundSecurityCustomizer
.
this
.
builder
.
getOrBuild
()
.
authenticate
(
authentication
);
}
}
};
};
}
}
...
...
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