Class DefaultBroadleafClientRegistrationRepository

java.lang.Object
com.broadleafcommerce.auth.client.registration.DefaultBroadleafClientRegistrationRepository
All Implemented Interfaces:
BroadleafClientRegistrationRepository, org.springframework.security.oauth2.client.registration.ClientRegistrationRepository

public class DefaultBroadleafClientRegistrationRepository extends Object implements BroadleafClientRegistrationRepository
Provides ClientRegistration objects to the OAuth2 Client beans. This class relies on the ContextHelperService to get the current tenant id from request attributes. This enables us to allow tenant tracking while preserving the ClientRegistrationRepository interface from the OAuth2 Client library. This class has the ability to incorporate OAuthClientRegistrationWrapper data built from application properties. The OAuthClientRegistrationPersistenceService will always be checked first. If a registration is not found there then this will check the ClientRegistrationPropertiesService. If a registration is found with the ClientRegistrationPropertiesService, it will be saved with OAuthClientRegistrationPersistenceService. Despite the name, this is not a repository in the usual sense. Its name is based on the Spring interface ClientRegistrationRepository that this class implements. Actual persistence operations are handled by OAuthClientRegistrationPersistenceService.
Author:
Cade Rea (cade-rea)