From 49ea57c39b598f9a18265e06067d1d69d3df2571 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Mon, 21 Dec 2020 14:33:05 -0800 Subject: [PATCH] working on fixing yodlee. --- config/dev.edn | 13 +++++++++---- dev.cljs.edn | 2 +- src/clj/auto_ap/yodlee/core.clj | 16 ++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/config/dev.edn b/config/dev.edn index cf524eb1..b9d97a76 100644 --- a/config/dev.edn +++ b/config/dev.edn @@ -9,12 +9,17 @@ :invoice-email "invoices-staging@mail.app.integreatconsult.com" :data-bucket "data.staging.app.integreatconsult.com" - :yodlee-cobrand-name "restserver" - :yodlee-cobrand-login "sbCobda48aa19712a83c3ca4e935dd5e5d46b1a" + :yodlee-cobrand-name "50ec7e57-297d-4970-941e-1cb07b8dcb4e_ADMIN" + :yodlee-cobrand-login "G7T9kiwaG8rMiykdV4pckmQnfj4OM2pf" :yodlee-cobrand-password "0a07ea32-1b5d-461b-ad0f-2752cdd77602" - :yodlee-user-login "sbMemda48aa19712a83c3ca4e935dd5e5d46b1a4" + + :yodlee-client-user-new "e02b38f9-9865-4264-8e4f-6a5ac2c500b0_ADMIN" + :yodlee-client-id "l6sUyK2NEq3mwopISHlFGWUcJ1U8OUQd" + :yodlee-client-secret "wZQHoGEkv5AGG2ZH" + + :yodlee-user-login "8I0mmq1wmAWSSpr9" :yodlee-user-password "sbMemda48aa19712a83c3ca4e935dd5e5d46b1a4#123" - :yodlee-base-url "https://developer.api.yodlee.com/ysl" + :yodlee-base-url "https://development.api.yodlee.com/ysl" :yodlee-app "10003600" :yodlee-fastlink "https://node.developer.yodlee.com/authenticate/restserver/?channelAppName=restserver" :run-web? true diff --git a/dev.cljs.edn b/dev.cljs.edn index 987101e6..a4d776cd 100644 --- a/dev.cljs.edn +++ b/dev.cljs.edn @@ -8,7 +8,7 @@ :infer-externs true :closure-defines {cljs.core/*global* "window"} - :bundle-cmd {:none ["npx" "webpack" "--mode=production" :output-to + :bundle-cmd {:none ["npx" "webpack" "--mode=development" :output-to "--output-path" :final-output-dir "--output-filename" :final-output-filename] :default ["npx" "webpack" "--mode=production" :output-to diff --git a/src/clj/auto_ap/yodlee/core.clj b/src/clj/auto_ap/yodlee/core.clj index 7ea2e704..83d853df 100644 --- a/src/clj/auto_ap/yodlee/core.clj +++ b/src/clj/auto_ap/yodlee/core.clj @@ -21,22 +21,18 @@ {})) (def base-headers {"Api-Version" "1.1" - "Cobrand-Name" (:yodlee-cobrand-name env) + "loginName" (:yodlee-client-user-new env) "Content-Type" "application/json"}) (defn login-cobrand [] - (-> (str (:yodlee-base-url env) "/cobrand/login") - (client/post (merge {:headers base-headers - :body - (json/write-str {:cobrand {:cobrandLogin (:yodlee-cobrand-login env) - :cobrandPassword (:yodlee-cobrand-password env) - :locale "en_US"}}) + (-> (str (:yodlee-base-url env) "/auth/token") + (client/post (merge {:headers (assoc base-headers + "Content-Type" "application/x-www-form-urlencoded") + :body (str "clientId=" (:yodlee-client-id env) " &secret=" (:yodlee-client-secret env)) :as :json} other-config) ) - :body - :session - :cobSession)) + :body)) (defn login-user