This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-11
Channels
- # beginners (57)
- # boot (9)
- # clara (9)
- # cljs-dev (12)
- # clojure (98)
- # clojure-boston (1)
- # clojure-dusseldorf (12)
- # clojure-france (1)
- # clojure-greece (1)
- # clojure-spec (41)
- # clojure-uk (86)
- # clojurescript (60)
- # code-art (2)
- # data-science (5)
- # datomic (5)
- # duct (1)
- # fulcro (14)
- # graphql (2)
- # lein-figwheel (4)
- # luminus (1)
- # midje (1)
- # off-topic (19)
- # om (10)
- # onyx (13)
- # pedestal (5)
- # portkey (59)
- # re-frame (31)
- # reagent (1)
- # ring (14)
- # ring-swagger (1)
- # rum (5)
- # shadow-cljs (90)
- # spacemacs (5)
- # specter (47)
- # sql (9)
- # uncomplicate (95)
- # vim (32)
@baptiste-from-paris that’s for you ^^
you made it to Baltimore ?
are you talking there ?
unsession of unrepl’s
that’s nice too ! and talking about portkey
? too soon ?
I’d love to use om-next with portkey for a demo
what do you think about allowing resource directory instead of files
main example would be assets file like css/js/html/img
ok except that you formulated your request as “allowing resource directory instead of files” and I’m ok for “allowing resource directory in addition to files”
yes, my mistake
Let’s train a braindump: • these are JDK classes so we don’t have control on the version
back to the loader problem or #’wrapper or something else ,
• these are JDK classes so we don't have control on the version
=> fix a jdk version for now
yes indeed, and to be honest I am not confortable enough with portkey to realize how big the problem is
that’s what I was going to say, I remember having to turn off SSL with Google client api and portkey
because of (java.security KeyStore)
yes, let me find you pieces of code
this code works fine localy =>
(defn gmail-service [app-name account-id file-path account-user]
(let [transport (.. (NetHttpTransport$Builder.)
(trustCertificates (GoogleUtils/getCertificateTrustStore))
(build))
jackson (JacksonFactory/getDefaultInstance)
credentials (.. (GoogleCredential$Builder.)
(setTransport transport)
(setJsonFactory jackson)
(setServiceAccountId account-id)
(setServiceAccountPrivateKeyFromP12File (File. file-path))
(setServiceAccountScopes (GmailScopes/all))
(setServiceAccountUser account-user)
(build))]
#_(.refreshToken credentials)
(.. (Gmail$Builder. transport jackson credentials)
(setApplicationName app-name)
(build))))
it let’s you create a gmail-service with a g-suite accounte (pro) and do pretty-much what ever you want with your g-suite account
but it does not work on portkey
because of this line
(trustCertificates (GoogleUtils/getCertificateTrustStore))
i’am addicted to CLJ for a year ^^
and this getCertificateTrustStore
does this =>
public static synchronized KeyStore getCertificateTrustStore()
throws IOException, GeneralSecurityException {
if (certTrustStore == null) {
certTrustStore = SecurityUtils.getJavaKeyStore();
InputStream keyStoreStream = GoogleUtils.class.getResourceAsStream("google.jks");
SecurityUtils.loadKeyStore(certTrustStore, keyStoreStream, "notasecret");
}
return certTrustStore;
}
It’s an opinion but ->
allows to mix fns and methods, and force you to prefix methods by .
making it more locally obvious it’s interop
ok, thx. will try this way then
and loadKeyStore
fails
because SecurityUtils.getJavaKeyStore();
returns null
I have to trie it again but I think that java.security.getInstance
was failing
I’ll check tomorrow morning what this one returns = clj-http.conn-mgr/get-keystore
I don’t know if It helps or not