Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Deprecates modules and starters.
Browse files Browse the repository at this point in the history
Fixes gh-232
  • Loading branch information
spencergibb committed May 22, 2020
1 parent ec1164e commit 621321e
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ easy to use in a service platform like Cloud Foundry. Building on
Spring Boot and Spring Security OAuth2 we can quickly create systems that
implement common patterns like single sign on, token relay and token
exchange.

WARNING: In a future major release, the functionality contained in this project will move to the respective projects.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.security.oauth2;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.context.annotation.Configuration;

/**
* @author Spencer Gibb
* @since 2.2.2
* @deprecated All modules and starters are deprecated as of 2.2.2, in the next major
* release, functionality will moved to specific projects (feign or gateway).
*/
@Configuration(proxyBeanMethods = false)
@Deprecated
public class SpringCloudSecurityAutoConfiguration {

private static final Log LOG = LogFactory
.getLog(SpringCloudSecurityAutoConfiguration.class);

public SpringCloudSecurityAutoConfiguration() {
LOG.warn("All Spring Cloud Security modules and starters are deprecated. "
+ "They will be moved to individual projects in the next major release.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @author Dave Syer
*
*/
@Deprecated
public class AccessTokenContextRelay {

private OAuth2ClientContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
@ConditionalOnProperty(value = "security.oauth2.resource.loadBalanced",
matchIfMissing = false)
@AutoConfigureAfter(OAuth2AutoConfiguration.class)
@Deprecated
public class OAuth2LoadBalancerClientAutoConfiguration {

@Configuration(proxyBeanMethods = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
@ConditionalOnOAuth2ClientInResourceServer
@ConditionalOnClass(ResourceServerConfiguration.class)
@ConditionalOnWebApplication
@Deprecated
public class ResourceServerTokenRelayAutoConfiguration {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
* {@link OAuth2ClientContext OAuth2ClientContext} provided from the environment and
* construct a new header on the request before it is made by Feign.
*
* @deprecated will move to Spring Cloud Openfeign in next major release.
* @author Joao Pedro Evangelista
* @author Tim Ysewyn
*/
@Deprecated
public class OAuth2FeignRequestInterceptor implements RequestInterceptor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
SecurityWebFilterChain.class, SecurityProperties.class })
@ConditionalOnWebApplication
@EnableConfigurationProperties(ProxyAuthenticationProperties.class)
@Deprecated
public class TokenRelayAutoConfiguration {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@

/**
* @author Joe Grandja
* @deprecated will move to Spring Cloud Gateway in next major release.
*/
@Component
@Deprecated
public class TokenRelayGatewayFilterFactory extends AbstractGatewayFilterFactory<Object> {

private ServerOAuth2AuthorizedClientRepository authorizedClientRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* @author Dave Syer
*
*/
@Deprecated
public class AuthenticationHeaderFilter extends ZuulFilter {

private Map<String, Route> routes = new HashMap<String, Route>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
SecurityProperties.class })
@ConditionalOnWebApplication
@EnableConfigurationProperties(ProxyAuthenticationProperties.class)
@Deprecated
public class OAuth2ProxyAutoConfiguration {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @author Dave Syer
*
*/
@Deprecated
public class OAuth2TokenRelayFilter extends ZuulFilter {

private static final String ACCESS_TOKEN = "ACCESS_TOKEN";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
*/
@ConfigurationProperties("proxy.auth")
@Deprecated
public class ProxyAuthenticationProperties {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Autoconfig
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.security.oauth2.SpringCloudSecurityAutoConfiguration,\
org.springframework.cloud.security.oauth2.gateway.TokenRelayAutoConfiguration,\
org.springframework.cloud.security.oauth2.proxy.OAuth2ProxyAutoConfiguration,\
org.springframework.cloud.security.oauth2.client.OAuth2LoadBalancerClientAutoConfiguration,\
Expand Down

0 comments on commit 621321e

Please sign in to comment.