Open dupuchba opened 6 years ago
Here is the signing V2 method tested on simple db.
Note :
you can test it with this sample code
(let [host "sdb.eu-west-1.amazonaws.com" access-key "MY-ACCESS-KEY" secret-key "MY-SECRET-KEY" domain-name "Name1" qp {"Action" "CreateDomain" "AWSAccessKeyId" access-key "DomainName" domain-name "SignatureVersion" "2" "SignatureMethod" "HmacSHA256" "Timestamp" (.format (java.time.LocalDateTime/now (java.time.ZoneId/of "Z")) sigv2-x-amz-date-formatter) "Version" "2009-04-15"}] (->> qp (sigv2-canonicalized-query-string :query-params) (sigv2-string-to-sign "POST" host "/") (sigv2-base-64-hmac-signature secret-key) (assoc qp "Signature") (assoc {:debug true :debug-body true :content-type "application/x-www-form-urlencoded"} :form-params) (clj-http.client/post (str "https://" host))))
Focus :
Here is the signing V2 method tested on simple db.
Note :
you can test it with this sample code
Focus :