Fork me on GitHub
#aws
<
2018-05-22
>
fabrao18:05:22

Hello all, I saw the project https://github.com/lambci/docker-lambda, do you think is a good choice for evaluate Aws Lambda without registering?

Geoffrey Gaillard21:05:57

I'm trying to check a Cognito JWT using buddy-sign but it seems buddy is requiring a secret parameter, and AWS only provides a jwks.json file. Did some of you managed to use it ?

Geoffrey Gaillard21:05:21

Found a solution to my own problem. It seems I forgot how to google ^^. For log records:

(def token "HEADER.PAYLOAD.VERIFY")

(defn decode-b64 [str] (String. (clojure.data.codec.base64/decode (.getBytes str))))

(let [[header payload verify] (clojure.string/split token #"\.")]
  {:header  (decode-b64 header)
   :payload (decode-b64 payload)
   :verify  :not-meant-to-be-decoded})