   ([data]
    (MemoryStore. (atom data))))
 
-(defn new-mongo-store [mongo-db coll]
-  (MongoStore. mongo-db coll))
+(defn new-mongo-store [mongo-db coll k]
+  (MongoStore. mongo-db coll k))
 
 (defn get-mongo-db [mongo-uri]
   (log/debug "Connecting to mongo")

    (log/debug "Connected to mongo.")
    db))

(defn- create-mongo-store [db collection]
  (new-mongo-store db collection))

(defn create-user-store [db]
  (create-mongo-store db user-collection))

(defn create-token-store [db]
  (create-mongo-store db token-collection))

(defn create-auth-code-store [db]
  (create-mongo-store db auth-code-collection))

(defn create-client-store [db]
  (create-mongo-store db client-collection))

(defn create-confirmation-store [db]
  (create-mongo-store db confirmation-collection))

(defn create-forgotten-password-store [db]
  (create-mongo-store db forgotten-password-collection))

(defn create-session-store [db]
  (mongo-session/session-store db session-collection))

(defn create-invitation-store [db]
  (create-mongo-store db invitation-collection))

  (revoke! [this t]
    (when t
      (mc/remove-by-id mongo-db coll t)))
  (store! [this _ item]
    (-> (mc/insert-and-return mongo-db coll (assoc item :_id (k item)))
        (dissoc :_id)))
  (entries [this]
