Skip to content

Commit 6776ec2

Browse files
committed
Merge branch '1.5.x'
2 parents c0012a4 + 565f754 commit 6776ec2

File tree

13 files changed

+29
-25
lines changed

13 files changed

+29
-25
lines changed

Diff for: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerConfiguration.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import org.springframework.beans.BeanUtils;
2020
import org.springframework.beans.BeansException;
21-
import org.springframework.beans.factory.annotation.Autowired;
2221
import org.springframework.beans.factory.config.BeanPostProcessor;
2322
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
2423
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
@@ -106,9 +105,8 @@ public void configure(HttpSecurity http) throws Exception {
106105
public static class ResourceServerFilterChainOrderProcessor
107106
implements BeanPostProcessor {
108107

109-
private ResourceServerProperties resource;
108+
private final ResourceServerProperties resource;
110109

111-
@Autowired
112110
public ResourceServerFilterChainOrderProcessor(
113111
ResourceServerProperties resource) {
114112
this.resource = resource;

Diff for: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Diff for: spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfigurationTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121
import java.util.List;
2222

2323
import com.fasterxml.jackson.databind.JsonNode;
24-
2524
import org.junit.Test;
2625

2726
import org.springframework.aop.support.AopUtils;

Diff for: spring-boot-dependencies/pom.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24
<modelVersion>4.0.0</modelVersion>
35
<groupId>org.springframework.boot</groupId>
46
<artifactId>spring-boot-dependencies</artifactId>
@@ -2561,4 +2563,4 @@
25612563
<id>integration-test</id>
25622564
</profile>
25632565
</profiles>
2564-
</project>
2566+
</project>

Diff for: spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ content into your application; rather pick only the properties that you need.
453453
security.oauth2.client.client-secret= # OAuth2 client secret. A random secret is generated by default
454454
455455
# SECURITY OAUTH2 RESOURCES ({sc-spring-boot-autoconfigure}/security/oauth2/resource/ResourceServerProperties.{sc-ext}[ResourceServerProperties])
456+
security.oauth2.resource.filter-order= # The order of the filter chain used to authenticate tokens.
456457
security.oauth2.resource.id= # Identifier of the resource.
457458
security.oauth2.resource.jwt.key-uri= # The URI of the JWT token. Can be set if the value is not available and the key is public.
458459
security.oauth2.resource.jwt.key-value= # The verification key of the JWT token. Can either be a symmetric secret or PEM-encoded RSA public key.

Diff for: spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

+4-3
Original file line numberDiff line numberDiff line change
@@ -2529,9 +2529,10 @@ needs to be running when your application starts up. It will log a warning if it
25292529
find the key, and tell you what to do to fix it.
25302530

25312531
OAuth2 resources are protected by a filter chain with order
2532-
`security.oauth2.resource.filter-order` and the default is after the
2533-
filter protecting the actuator endpoints by default (so actuator
2534-
endpoints will stay on HTTP Basic unless you change the order).
2532+
`security.oauth2.resource.filter-order` and the default is after the filter protecting the
2533+
actuator endpoints by default (so actuator endpoints will stay on HTTP Basic unless you
2534+
change the order).
2535+
25352536

25362537

25372538
[[boot-features-security-oauth2-token-type]]

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-actuator/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,10 +48,10 @@
4848
public class SampleSecureOAuth2ResourceApplicationTests {
4949

5050
@Autowired
51-
WebApplicationContext context;
51+
private WebApplicationContext context;
5252

5353
@Autowired
54-
FilterChainProxy filterChain;
54+
private FilterChainProxy filterChain;
5555

5656
private MockMvc mvc;
5757

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-resource/pom.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<!-- Your own application should inherit from spring-boot-starter-parent -->

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/main/java/sample/secure/oauth2/resource/Flight.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/main/java/sample/secure/oauth2/resource/FlightRepository.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/main/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,16 +40,17 @@
4040
* OAuth2-secured system
4141
*
4242
* @author Greg Turnquist
43+
* @author Dave Syer
4344
*/
4445
@RunWith(SpringRunner.class)
4546
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
4647
public class SampleSecureOAuth2ResourceApplicationTests {
4748

4849
@Autowired
49-
WebApplicationContext context;
50+
private WebApplicationContext context;
5051

5152
@Autowired
52-
FilterChainProxy filterChain;
53+
private FilterChainProxy filterChain;
5354

5455
private MockMvc mvc;
5556

Diff for: spring-boot-samples/spring-boot-sample-secure-oauth2/src/test/java/sample/secure/oauth2/SampleSecureOAuth2ApplicationTests.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.secure.oauth2;
1718

1819
import java.util.Map;
@@ -54,10 +55,10 @@
5455
public class SampleSecureOAuth2ApplicationTests {
5556

5657
@Autowired
57-
WebApplicationContext context;
58+
private WebApplicationContext context;
5859

5960
@Autowired
60-
FilterChainProxy filterChain;
61+
private FilterChainProxy filterChain;
6162

6263
private MockMvc mvc;
6364

0 commit comments

Comments
 (0)