@Configuration @AutoConfigureAfter(value=org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration.class) @ResourceServerTokenRelayAutoConfiguration.ConditionalOnOAuth2ClientInResourceServer @ConditionalOnClass(value=org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration.class) @ConditionalOnWebApplication public class ResourceServerTokenRelayAutoConfiguration extends Object
@EnableOAuth2Client and an
OAuth2RestTemplate. An MVC interceptor is used so as to have a minimal
impact on the call stack. If you are not using MVC you could use a custom filter or AOP
interceptor wrapping the same call to an AccessTokenContextRelay.
UserInfoTokenServices generally doesn't need this
interceptor, but it doesn't hurt to include it.| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceServerTokenRelayAutoConfiguration.ResourceServerTokenRelayRegistrationAutoConfiguration |
| Constructor and Description |
|---|
ResourceServerTokenRelayAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
AccessTokenContextRelay |
accessTokenContextRelay(org.springframework.security.oauth2.client.OAuth2ClientContext context) |
public ResourceServerTokenRelayAutoConfiguration()
@Bean public AccessTokenContextRelay accessTokenContextRelay(org.springframework.security.oauth2.client.OAuth2ClientContext context)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.