@Repository public interface JpaAuthorizedClientRepository<D extends JpaAuthorizedClient> extends AuthorizedClientRepository<D>
Modifier and Type | Method and 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() |
findAll, findAllByServerId, findByApplicationId, findByClientId
@Query(value="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)
AuthorizedClientRepository
findByIsAdminTrueAndServerTenantId
in interface AuthorizedClientRepository<D extends JpaAuthorizedClient>
tenantId
- the tenant ID@Query(value="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)
AuthorizedClientRepository
findByApplicationIdAndServerTenantId
in interface AuthorizedClientRepository<D extends JpaAuthorizedClient>
applicationId
- the application IDtenantId
- the tenant IDCopyright © 2021. All rights reserved.