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 Type
    Method
    Description
    Return a Map of all available 3rd party OAuth providers.
    org.springframework.security.oauth2.client.registration.ClientRegistration
    findByRegistrationIdAndTenantId(String registrationId, String tenantId)
    Looks up a ClientRegistration by 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 the OAuthClientRegistrationWrapper.
      Returns:
      A Map of OAuthClientRegistrationWrapper.registrationId to OAuthClientRegistrationWrapper
    • findByRegistrationIdAndTenantId

      @Nullable org.springframework.security.oauth2.client.registration.ClientRegistration findByRegistrationIdAndTenantId(String registrationId, String tenantId)

      Looks up a ClientRegistration by its registration id and the given tenant ID. This will first check the OAuthClientRegistrationPersistenceService. If not found there, this will check ClientRegistrationPropertiesService.

      This method differs from ClientRegistrationRepository.findByRegistrationId(String), as that method implicitly retrieves the tenant ID via ContextHelperService.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 ClientRegistration that corresponds to the given registration id.