(ns cadence.security
  (:require [cemerick.friend :as friend]
            (cemerick.friend [workflows :as workflows]
                             [credentials :as creds])
            ;[oauth.client :as oauth]
            [cadence.model :as model])
  (:use [noir.core :only [pre-route]]))

(def friend-settings
      {:credential-fn (partial creds/bcrypt-credential-fn model/get-user)
       :workflows [(workflows/http-basic)]
       :login-uri "/login"
       :unauthorized-redirect-uri "/login"
       :default-landing-uri "/"})

(pre-route [:any "/user.*"] {:as req}
       (friend/authenticated nil))

(ns cadence.security
  (:require [cemerick.friend :as friend]
            (cemerick.friend [workflows :as workflows]
                             [credentials :as creds])
            ;[oauth.client :as oauth]
            [cadence.model :as model])
  (:use [noir.core :only [pre-route]]))

(def friend-settings
      {:credential-fn (partial creds/bcrypt-credential-fn model/get-user)
       :workflows [(workflows/interactive-form)]
       :login-uri "/login"
       :unauthorized-redirect-uri "/login"
       :default-landing-uri "/"})

(pre-route [:any "/user.*"] {:as req}
       (friend/authenticated nil))

Revert "Changes workflow from interactive-form to http-basic."
Revert "Changes workflow from interactive-form to http-basic."

This reverts commit ae8020769e889e5774f8e3cdf1532d65ce272b7b.

RyanMcG/Cadence,RyanMcG/Cadence