Interface ApiKeyRepo

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

@Repository public interface ApiKeyRepo extends org.springframework.data.jpa.repository.JpaRepository<ApiKey,String>
The interface Api key repo.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Deprecated.
    (The migration feature for all apikeys to Keycloak clients was abandoned)
    Find by email optional.
    Find by email and app name list.
    Find by keycloak id optional.

    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, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush

    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

    • findByEmail

      Optional<ApiKey> findByEmail(String email)
      Find by email optional.
      Parameters:
      email - the email
      Returns:
      the optional
    • findByKeycloakId

      Optional<ApiKey> findByKeycloakId(String keycloakId)
      Find by keycloak id optional.
      Parameters:
      keycloakId - the keycloak id
      Returns:
      the optional
    • findAll

      List<ApiKey> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<ApiKey,String>
      Specified by:
      findAll in interface org.springframework.data.jpa.repository.JpaRepository<ApiKey,String>
    • findByEmailAndAppName

      List<ApiKey> findByEmailAndAppName(String email, String appName)
      Find by email and app name list.
      Parameters:
      email - the email
      appName - the app name
      Returns:
      the list
    • findAllKeysToMigrate

      @Deprecated(since="version 0.2 to be released late november 2020") @Query("SELECT a FROM ApiKey a WHERE (a.keycloakId is null OR a.keycloakId = \'to-migrate\')") List<ApiKey> findAllKeysToMigrate()
      Deprecated.
      (The migration feature for all apikeys to Keycloak clients was abandoned)
      Find all keys to migrate list.
      Returns:
      the list