code: public AuthSource findByStrategy(String strategy) {
      EntityManager entityManager = getEntityManager();
      
      CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
      CriteriaQuery<AuthSource> criteria = criteriaBuilder.createQuery(AuthSource.class);
      Root<AuthSource> root = criteria.from(AuthSource.class);
      criteria.select(root);
      criteria.where(
        criteriaBuilder.equal(root.get(AuthSource_.strategy), strategy)
      );
  
      return getSingleResult(entityManager.createQuery(criteria)); 
    }
docs: Finds an auth source by strategy
  
  @param strategy strategy
  @return auth source or null if not found