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 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: AuthorizedClientRepository
        Finds an authorized client for a tenant admin.
        Specified by:
        findByIsAdminTrueAndServerTenantId in interface AuthorizedClientRepository<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 interface AuthorizedClientRepository<D extends JpaAuthorizedClient>
        Parameters:
        applicationId - the application ID
        tenantId - the tenant ID
        Returns:
        an optional of authorized client
      • getDomainType

        default Class<D> getDomainType()
        Specified by:
        getDomainType in interface com.broadleafcommerce.common.extension.DomainTypeAware