   (add-user! [_ uid pw]
     (if (satisfies? NewUserCreator user-password-authorizer)
       (add-user! user-password-authorizer uid pw)
-      (throw (ex-info "This protection domain implementation does not support the creation of new users" {})))))
-
-(def new-default-protection-domain-schema
+      (throw (ex-info "This protection system implementation does not support the creation of new users" {})))))
+
+(def new-default-protection-system-schema
   {:password-file s/Any
    (s/optional-key :session-timeout-in-seconds) s/Int
    (s/optional-key :boilerplate) (s/=> 1)
    })
 
-(defn new-default-protection-domain [& {:as opts}]
-  (s/validate new-default-protection-domain-schema opts)
-  (map->ProtectionDomain
+(defn new-default-protection-system [& {:as opts}]
+  (s/validate new-default-protection-system-schema opts)
+  (map->ProtectionSystem
    {:protector (if-let [boilerplate (:boilerplate opts)]
                  (new-login-form :boilerplate boilerplate)
                  (new-login-form))


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

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

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

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