diff --git a/src/clj/cat/moauth.clj b/src/clj/cat/moauth.clj index d91afb4..84872ef 100644 --- a/src/clj/cat/moauth.clj +++ b/src/clj/cat/moauth.clj @@ -8,11 +8,11 @@ ; Inspired by https://leonid.shevtsov.me/post/oauth2-is-easy/ (defn- oauth2-params [] - {:client-id (env :oauth_consumer_key) - :client-secret (env :oauth_consumer_secret) - :authorize-uri (env :authorize_uri) + {:client-id (env :oauth-consumer-key) + :client-secret (env :oauth-consumer-secret) + :authorize-uri (env :authorize-uri) :redirect_uri (str (env :app-host) "/oauth/oauth-callback") - :access-token-uri (env :access_token_uri) + :access-token-uri (env :access-token-uri) ;:scope "activity profile" }) diff --git a/src/clj/cat/oauth.clj b/src/clj/cat/oauth.clj index 7d1c06f..e122d93 100644 --- a/src/clj/cat/oauth.clj +++ b/src/clj/cat/oauth.clj @@ -3,15 +3,15 @@ [oauth.client :as oauth] [mount.core :refer [defstate]] [clojure.tools.logging :as log])) - -(defstate consumer - :start (oauth/make-consumer - (env :oauth-consumer-key) - (env :oauth-consumer-secret) - (env :request-token-uri) - (env :access-token-uri) - (env :authorize-uri) - :hmac-sha1)) +; +;(defstate consumer +; :start (oauth/make-consumer +; (env :oauth-consumer-key) +; (env :oauth-consumer-secret) +; (env :request-token-uri) +; (env :access-token-uri) +; (env :authorize-uri) +; :hmac-sha1)) (defn oauth-callback-uri "Generates the oauth request callback URI" diff --git a/src/clj/cat/routes/home.clj b/src/clj/cat/routes/home.clj index d0d761d..42a38ef 100644 --- a/src/clj/cat/routes/home.clj +++ b/src/clj/cat/routes/home.clj @@ -1,10 +1,11 @@ (ns cat.routes.home (:require [cat.layout :as layout] + [cat.config :refer [env]] [cat.db.core :refer [*db*] :as db] [compojure.core :refer [defroutes GET POST]] [ring.util.http-response :as response] [struct.core :as st] - [clojure.tools.logging :as log] + [clojure.tools.logginqg :as log] [cat.layout :refer [error-page]] [clojure.string :as s])) diff --git a/src/clj/cat/routes/oauth.clj b/src/clj/cat/routes/oauth.clj index 9d35a4e..346587e 100644 --- a/src/clj/cat/routes/oauth.clj +++ b/src/clj/cat/routes/oauth.clj @@ -1,8 +1,6 @@ (ns cat.routes.oauth (:require [ring.util.http-response :refer [ok found]] [compojure.core :refer [defroutes GET]] - [clojure.java.io :as io] - [cat.oauth :as oauth] [clojure.tools.logging :as log] [cat.moauth :as mo] [cat.db.core :refer [*db*] :as db]))