Interface JpaAuthorizedClientRepository<D extends JpaAuthorizedClient>
- All Superinterfaces:
AuthorizedClientRepository<D>
,org.springframework.data.repository.CrudRepository<D,
,String> com.broadleafcommerce.common.extension.DomainTypeAware
,org.springframework.data.repository.Repository<D,
String>
@Repository
public interface JpaAuthorizedClientRepository<D extends JpaAuthorizedClient>
extends AuthorizedClientRepository<D>
- Author:
- Jon Fleschler (jfleschler), Nick Crum (ncrum)
-
Method Summary
Modifier and TypeMethodDescriptionfindByApplicationIdAndServerTenantId
(String applicationId, String tenantId) Finds an authorized client for a customer-facing application within a tenant.findByIsAdminTrueAndServerTenantId
(String tenantId) Finds an authorized client for a tenant admin.Methods inherited from interface com.broadleafcommerce.auth.server.repository.AuthorizedClientRepository
findAll, findAllByServerId, findByApplicationId, findByClientId
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByIsAdminTrueAndServerTenantId
@Query("select client from JpaAuthorizedClient client where client.isAdmin = true and exists (select \'found\' from JpaAuthorizationServer server where server.id = client.serverId and server.tenantId = :tenantId)") Optional<D> findByIsAdminTrueAndServerTenantId(String tenantId) Description copied from interface:AuthorizedClientRepository
Finds an authorized client for a tenant admin.- Specified by:
findByIsAdminTrueAndServerTenantId
in interfaceAuthorizedClientRepository<D extends JpaAuthorizedClient>
- Parameters:
tenantId
- the tenant ID- Returns:
- an optional of authorized client
-
findByApplicationIdAndServerTenantId
@Query("select client from JpaAuthorizedClient client where client.applicationId = :applicationId and exists (select \'found\' from JpaAuthorizationServer server where server.id = client.serverId and server.tenantId = :tenantId)") Optional<D> findByApplicationIdAndServerTenantId(String applicationId, String tenantId) Description copied from interface:AuthorizedClientRepository
Finds an authorized client for a customer-facing application within a tenant.- Specified by:
findByApplicationIdAndServerTenantId
in interfaceAuthorizedClientRepository<D extends JpaAuthorizedClient>
- Parameters:
applicationId
- the application IDtenantId
- the tenant ID- Returns:
- an optional of authorized client
-
getDomainType
- Specified by:
getDomainType
in interfacecom.broadleafcommerce.common.extension.DomainTypeAware
-