working on fixing yodlee.

This commit is contained in:
Bryce Covert
2020-12-21 14:33:05 -08:00
parent 32009f8599
commit 49ea57c39b
3 changed files with 16 additions and 15 deletions

View File

@@ -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