Interface OAuth2AuthorizedClientEntityRepository<D,I>
- Type Parameters:
D
- the persisted-domain counterpart forOAuth2AuthorizedClientEntity
- 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 Summary
Modifier and TypeMethodDescriptionvoid
deleteByClientRegistrationIdAndPrincipalNameAndTenantId
(String clientRegistrationId, String principalName, String tenantId) findByClientRegistrationIdAndPrincipalNameAndTenantId
(String clientRegistrationId, String principalName, String tenantId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
Methods inherited from interface com.broadleafcommerce.auth.client.repository.CustomizedOAuth2AuthorizedClientEntityRepository
cleanupOutdatedEntities, insert
Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
-
Method Details
-
findByClientRegistrationIdAndPrincipalNameAndTenantId
Optional<D> findByClientRegistrationIdAndPrincipalNameAndTenantId(String clientRegistrationId, String principalName, String tenantId) - Parameters:
clientRegistrationId
- theClientRegistration.getRegistrationId()
to filter byprincipalName
- thePrincipal.getName()
to filter bytenantId
- the tenant ID to filter by- Returns:
- an
Optional
containing the matching entity if found, elseOptional.empty()
-
deleteByClientRegistrationIdAndPrincipalNameAndTenantId
void deleteByClientRegistrationIdAndPrincipalNameAndTenantId(String clientRegistrationId, String principalName, String tenantId) - Parameters:
clientRegistrationId
- theClientRegistration.getRegistrationId()
to filter byprincipalName
- thePrincipal.getName()
to filter bytenantId
- the tenant ID to filter by
-