Class SynchronizedDelegatingOAuth2AuthorizedClientManager
java.lang.Object
com.broadleafcommerce.recommendationengine.oauth2.client.web.SynchronizedDelegatingOAuth2AuthorizedClientManager
- All Implemented Interfaces:
 org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager
public class SynchronizedDelegatingOAuth2AuthorizedClientManager
extends Object
implements org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager
This component implements 
OAuth2AuthorizedClientManager and internally instantiates and
 delegates to AuthorizedClientServiceOAuth2AuthorizedClientManager.
 The only difference between this and AuthorizedClientServiceOAuth2AuthorizedClientManager
 is that this attempts to serialize on the
 OAuth2AuthorizeRequest.getClientRegistrationId(). The reason is that these clients are
 normally shared clients, with shared access tokens. As a result, only one thread needs to call
 the auth server when the token is unavailable or otherwise expired. The token is then stored in
 InMemoryOAuth2AuthorizedClientService for re-use across threads.
 This helps prevent a race condition where multiple threads are trying to fetch the same token at
 the same time via a network call.- Author:
 - Kelly Tisdell (ktisdell)
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSynchronizedDelegatingOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository)  - 
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.client.OAuth2AuthorizedClientauthorize(org.springframework.security.oauth2.client.OAuth2AuthorizeRequest authorizeRequest) voidsetAuthorizedClientProvider(org.springframework.security.oauth2.client.OAuth2AuthorizedClientProvider authorizedClientProvider)  
- 
Constructor Details
- 
SynchronizedDelegatingOAuth2AuthorizedClientManager
public SynchronizedDelegatingOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository)  
 - 
 - 
Method Details
- 
authorize
public org.springframework.security.oauth2.client.OAuth2AuthorizedClient authorize(org.springframework.security.oauth2.client.OAuth2AuthorizeRequest authorizeRequest) - Specified by:
 authorizein interfaceorg.springframework.security.oauth2.client.OAuth2AuthorizedClientManager
 - 
setAuthorizedClientProvider
public void setAuthorizedClientProvider(org.springframework.security.oauth2.client.OAuth2AuthorizedClientProvider authorizedClientProvider) - See Also:
 - 
AuthorizedClientServiceOAuth2AuthorizedClientManager.setAuthorizedClientProvider(OAuth2AuthorizedClientProvider)
 
 
 -