 
 (defn new-mandatory-protected-bidi-routes
   "Like new-protected-bidi-routes above, but the absence of
-  a :protection-domain dependency will cause an error."
+  a :protection-system dependency will cause an error."
   [routes & {:as opts}]
   (component/using
    (apply new-protected-bidi-routes routes (apply concat (seq opts)))
-   [:protection-domain]))
+   [:protection-system]))

                         (or (:session-timeout-in-seconds opts)
                             10))}))

;; Now that we have a protection domain, we want the ability to create
;; bidi routes components that can be protected by simply declaring a dependency upon the protection domain component.

(defrecord ProtectedBidiRoutes [routes context]
  component/Lifecycle
  (start [this]
    (let [protector (get-in this [:protection-domain :protector])
          routes (cond-> routes
                         (fn? routes) (apply [this])
                         protector ((partial protect-bidi-routes protector)))]

             (s/validate new-login-form-schema))]
    (component/using (->LoginForm path context boilerplate) [:user-password-authorizer :http-session-store])))

;; Now we can build a protection system, composed of a login form, user
;; authorizer and session store. Different constructors can build this
;; component in different ways.

(defrecord ProtectionSystem [protector user-password-authorizer http-session-store]
  component/Lifecycle
  (start [this] (component/start-system this (keys this)))
  (stop [this] (component/stop-system this (keys this)))
  ;; In this implementation, we export any routes provided by
  ;; sub-components. These are the routes that provide login forms and
  ;; so on, nothing to do with the routes that are protected by this
  ;; protection system.
  BidiRoutesContributor
  (routes [this] ["" (vec (keep #(when (satisfies? BidiRoutesContributor %) (routes %)) (vals this)))])
  (context [this] (or
