Browse Source

Merge remote-tracking branch 'origin/3.1.x'

pull/764/head
Olga Maciaszek-Sharma 2 years ago
parent
commit
1e31a0d245
  1. 7
      spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/security/OAuth2AccessTokenInterceptor.java
  2. 2
      spring-cloud-openfeign-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json

7
spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/security/OAuth2AccessTokenInterceptor.java

@ -27,7 +27,6 @@ import org.springframework.security.authentication.AnonymousAuthenticationToken; @@ -27,7 +27,6 @@ import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.client.AuthorizedClientServiceOAuth2AuthorizedClientManager;
import org.springframework.security.oauth2.client.OAuth2AuthorizeRequest;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager;
@ -37,9 +36,9 @@ import org.springframework.util.StringUtils; @@ -37,9 +36,9 @@ import org.springframework.util.StringUtils;
/**
* A {@link RequestInterceptor} for OAuth2 Feign Requests. By default, it uses the
* {@link AuthorizedClientServiceOAuth2AuthorizedClientManager } to get
* {@link OAuth2AuthorizedClient } that holds an {@link OAuth2AccessToken }. If the user
* has specified an OAuth2 {@code clientRegistrationId} using the
* {@link OAuth2AuthorizedClientManager } to get {@link OAuth2AuthorizedClient } that
* holds an {@link OAuth2AccessToken }. If the user has specified an OAuth2
* {@code clientRegistrationId} using the
* {@code spring.cloud.openfeign.oauth2.clientRegistrationId} property, it will be used to
* retrieve the token. If the token is not retrieved or the {@code clientRegistrationId}
* has not been specified, the {@code serviceId} retrieved from the {@code url} host

2
spring-cloud-openfeign-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
"defaultValue": "false"
},
{
"name": "spring.cloud.openfeign.oauth2.clientId",
"name": "spring.cloud.openfeign.oauth2.registrationClientId",
"type": "java.lang.String",
"description": "Provides a clientId to be used with OAuth2.",
"defaultValue": ""

Loading…
Cancel
Save