Interface OAuth2AuthorizedClientEntityRepository<D,I>

Type Parameters:
D - the persisted-domain counterpart for OAuth2AuthorizedClientEntity
All Superinterfaces:
org.springframework.data.repository.CrudRepository<D,I>, CustomizedOAuth2AuthorizedClientEntityRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, org.springframework.data.repository.Repository<D,I>
All Known Subinterfaces:
JpaOAuth2AuthorizedClientEntityRepository<D,I>

@NoRepositoryBean public interface OAuth2AuthorizedClientEntityRepository<D,I> extends CustomizedOAuth2AuthorizedClientEntityRepository<D>, org.springframework.data.repository.CrudRepository<D,I>, com.broadleafcommerce.common.extension.DomainTypeAware

This is a CRUD repository for managing basic persistence operations around persistent counterparts of OAuth2AuthorizedClientEntity.

Notably, this is distinct from OAuth2AuthorizedClientRepository, which is a Spring component directly used by Spring Security. In practice, implementations of OAuth2AuthorizedClientRepository could internally delegate to this component for actual CRUD.

  • Method Details

    • findByClientRegistrationIdAndPrincipalNameAndTenantId

      Optional<D> findByClientRegistrationIdAndPrincipalNameAndTenantId(String clientRegistrationId, String principalName, String tenantId)
      Parameters:
      clientRegistrationId - the ClientRegistration.getRegistrationId() to filter by
      principalName - the Principal.getName() to filter by
      tenantId - the tenant ID to filter by
      Returns:
      an Optional containing the matching entity if found, else Optional.empty()
    • deleteByClientRegistrationIdAndPrincipalNameAndTenantId

      void deleteByClientRegistrationIdAndPrincipalNameAndTenantId(String clientRegistrationId, String principalName, String tenantId)
      Parameters:
      clientRegistrationId - the ClientRegistration.getRegistrationId() to filter by
      principalName - the Principal.getName() to filter by
      tenantId - the tenant ID to filter by