b- LoginClj edit** - wiki at8a.....

;LogIn ;{{{ ((defn login [] (handle "login" (fn [request response] "") (fn [request response] (let [wikiName (.getParameter request "wikiName") pw (.getParameter request "password") idServer "http://id.mindbroker.de/" idPage (fetch-url-s (str idServer "id?wikiName=" wikiName )) publicKey (get (re-find #"([a-zA-Z0-9]+)" idPage) 1) mindId (get (re-find #"([0-9]+)" idPage) 1) pwDigest (de.mindbroker.tools.Hash/getHash (str publicKey "#" pw)) loginStatusUrl (str idServer "login?wikiName=" wikiName "&passwordDigest=" pwDigest) loginStatusPage (fetch-url-s loginStatusUrl) hConf (new org.apache.hadoop.hbase.HBaseConfiguration) hTable (new org.apache.hadoop.hbase.client.HTable "EventLog") batch (new org.apache.hadoop.hbase.io.BatchUpdate (dateOfNow))] (if (.contains loginStatusPage "\"login\": true") (do (.put batch "log:EventType" (.getBytes "LogIn")) (.put batch "log:MindId" (.getBytes mindId)) (.put batch "log:RemoteAddr" (.getBytes (.getRemoteAddr request))) (.put batch "log:RemoteHost" (.getBytes (.getRemoteHost request))) (.commit hTable batch) (.setAttribute (.getSession request) "MindId" mindId) (.setAttribute (.getSession request) "WikiName" wikiName) (.sendRedirect response (.getParameter request "pathInfo")) ) (.sendRedirect response (str (.getParameter request "pathInfo") "&message=wrongPassword")) ))) ))) ;}}}