     (dosync (alter tokens assoc simple-token token-contents))
     simple-token))
 
-(def jws-token-backend
-  (jws-backend {:secret "secret" :options {:alg :hs512}}))
+(defn jws-token-backend [secret]
+  (jws-backend {:secret secret :options {:alg :hs512}}))
 
 (defn simple-token-fn [tokens]
   (fn [req token]

  (token-auth-mw [this]
    (fn [handler]
      (wrap-authentication
       handler jws-token-backend
       (token-backend {:authfn (simple-token-fn tokens)}))))
  (auth-credentials-response [this req]
    (let [user          (:identity req)

      {:id            (:id user)
       :username      (:username user)
       :permissions   (:permissions user)
       :token         (create-token secret user)
       :simple-token  (create-simple-token tokens user)
       :refreshToken  refresh-token}))
  (qs->token-mw [this]
