        (.setEnabledCipherSuites sec-opts (into-array String cipher-suites)))
      sec-opts)))
 
-
 (defn uri-content-source
-  "TODO"
+  "Return a ContentSource object according to the given `uri` and,
+  optionally, a configuration map describing a SecurityOptions object,
+  default Logger object, and boolean flag for whether basic
+  authentication should be attempted preemptively. Accepts URI or
+  string for `uri`."
   ([uri] (uri-content-source uri nil))
-  ;; Return a ContentSource object that will serve as the source of
-  ;; connections to the server specified by the given URI.
-  ([uri security-opts]
-   ;; TODO enforce or construct SecurityOptions for security-opts
-   (ContentSourceFactory/newContentSource (if (instance? URI uri)
-                                            uri (URI. uri))
-                                          security-opts)))
-
+  ([uri {:keys [security-options default-logger preemptive-auth]}]
+   (let [cs (if (instance? SecurityOptions security-options)
+              (ContentSourceFactory/newContentSource (if (instance? URI uri)
+                                                       uri (URI. uri))
+                                                     security-options)
+              (ContentSourceFactory/newContentSource (if (instance? URI uri)
+                                                       uri (URI. uri))))]
+     (when (instance? Logger default-logger)
+       (.setDefaultLogger cs default-logger))
+     (when (or (true? preemptive-auth)
+               (false? preemptive-auth))
+       (.setAuthenticationPreemptive cs preemptive-auth))
+     cs)))
+
+;; FIXME TODO all of these need to allow config map of :preemptive-auth, :default-logger
 (defn hosted-content-source
-  "TODO"
+  "Returna a ContentSource object according to the given `host`
+  String, integer `port`, and optionally `user` and `password`, and
+  `content-base`, and `security-options`."
   ([host port]
    ;; Return a ContentSource object that will serve as the source of
    ;; connections to the server on the given host and port, with no

;;;; Session management
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



(defn security-options
  "TODO"
  ([ssl-context] (security-options ssl-context nil))
  ([ssl-context {:keys [protocols cipher-suites]}]
   (let [sec-opts (SecurityOptions. ssl-context)]
     (when (seq protocols)

  (ContentSourceFactory/newContentSource cxn-provider
                                         user password
                                         content-base))

(defn- create-session*
  "Creates session, given map of database info. If complex connection
