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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<D>findByApplicationIdAndServerTenantId(String applicationId, String tenantId)Finds an authorized client for a customer-facing application within a tenant.Optional<D>findByIsAdminTrueAndServerTenantId(String tenantId)Finds an authorized client for a tenant admin.default Class<D>getDomainType()-
Methods inherited from interface com.broadleafcommerce.auth.server.repository.AuthorizedClientRepository
findAll, findAllByServerId, findByApplicationId, findByClientId
-
-
-
-
Method Detail
-
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:AuthorizedClientRepositoryFinds an authorized client for a tenant admin.- Specified by:
findByIsAdminTrueAndServerTenantIdin 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:AuthorizedClientRepositoryFinds an authorized client for a customer-facing application within a tenant.- Specified by:
findByApplicationIdAndServerTenantIdin interfaceAuthorizedClientRepository<D extends JpaAuthorizedClient>- Parameters:
applicationId- the application IDtenantId- the tenant ID- Returns:
- an optional of authorized client
-
-