Interface BroadleafClientRegistrationRepository
- All Superinterfaces:
org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
- All Known Implementing Classes:
DefaultBroadleafClientRegistrationRepository
public interface BroadleafClientRegistrationRepository
extends org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
This enhances the
ClientRegistrationRepository interface to enable users to get all
ClientRegistrations at once.- Author:
- Cade Rea (cade-rea)
-
Method Summary
Modifier and TypeMethodDescriptionReturn a Map of all available 3rd party OAuth providers.org.springframework.security.oauth2.client.registration.ClientRegistrationfindByRegistrationIdAndTenantId(String registrationId, String tenantId) Looks up aClientRegistrationby its registration id and the given tenant ID.Methods inherited from interface org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
findByRegistrationId
-
Method Details
-
findAllClientRegistrations
Map<String,OAuthClientRegistrationWrapper> findAllClientRegistrations()Return a Map of all available 3rd party OAuth providers. The map key is the registration id from theOAuthClientRegistrationWrapper.- Returns:
- A Map of
OAuthClientRegistrationWrapper.registrationIdtoOAuthClientRegistrationWrapper
-
findByRegistrationIdAndTenantId
@Nullable org.springframework.security.oauth2.client.registration.ClientRegistration findByRegistrationIdAndTenantId(String registrationId, String tenantId) Looks up a
ClientRegistrationby its registration id and the given tenant ID. This will first check theOAuthClientRegistrationPersistenceService. If not found there, this will checkClientRegistrationPropertiesService.This method differs from
ClientRegistrationRepository.findByRegistrationId(String), as that method implicitly retrieves the tenant ID viaContextHelperService.getTenantId(). In this method, the tenant ID is explicitly provided by the caller.- Parameters:
registrationId- The registration id, e.g. "google" or "facebook".tenantId- the tenant ID in which to find the registration- Returns:
- The
ClientRegistrationthat corresponds to the given registration id.
-