Interface ApiKeyRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ApiKey,UUID>, org.springframework.data.jpa.repository.JpaRepository<ApiKey,UUID>, org.springframework.data.repository.ListCrudRepository<ApiKey,UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<ApiKey,UUID>, org.springframework.data.repository.PagingAndSortingRepository<ApiKey,UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<ApiKey>, org.springframework.data.repository.Repository<ApiKey,UUID>

public interface ApiKeyRepository extends org.springframework.data.jpa.repository.JpaRepository<ApiKey,UUID>
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true when at least one enabled key exists, which puts the deployment in authenticated mode.
    Looks up an enabled key by its SHA-256 hex hash.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByKeyHashAndEnabledTrue

      Optional<ApiKey> findByKeyHashAndEnabledTrue(String keyHash)
      Looks up an enabled key by its SHA-256 hex hash. Disabled keys are intentionally excluded.
    • existsByEnabledTrue

      boolean existsByEnabledTrue()
      Returns true when at least one enabled key exists, which puts the deployment in authenticated mode.