Liking cljdoc? Tell your friends :D

aws-simple-sign.core

Relevant AWS documentation:
https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html
raw docstring

->query-strclj

(->query-str query-params)
source

algorithmclj

source

char-rangeclj

(char-range start end)
source

compute-signatureclj

(compute-signature {:keys [credentials str-to-sign region service short-date]})
source

construct-endpoint-strclj

(construct-endpoint-str {:keys [hostname protocols protocol region port]
                         :as _endpoint})

Helper function to deal with the endpoints data structure from Cognitect client which can be quite confusing.

Helper function to deal with the endpoints data structure from Cognitect client
which can be quite confusing.
sourceraw docstring

digitsclj

source

encodeclj

(encode skip-chars c)
source

formatterclj

source

generate-presigned-urlclj

(generate-presigned-url client
                        bucket
                        object-key
                        {:keys [endpoint path-style region] :as opts})

Takes client, bucket name, object key and an options map with the following default values:

{:path-style false    ; path-style is the 'old way' of URL's
 :endpoint nil}       ; alternative endpoint eg. "http://localhost:9000"

The options map is 'forwarded' to presign, see that function for more relevant options. Returns a presigned URL.

Takes client, bucket name, object key and an options map
with the following default values:

    {:path-style false    ; path-style is the 'old way' of URL's
     :endpoint nil}       ; alternative endpoint eg. "http://localhost:9000"

The options map is 'forwarded' to `presign`,
see that function for more relevant options.
Returns a presigned URL.
sourceraw docstring

get-query-paramsclj

(get-query-params params-str)
source

hash-sha256clj

(hash-sha256 input)
source

hashed-payloadclj

(hashed-payload payload)
source

hex-encodeclj

(hex-encode bytes)
source

hex-encode-strclj

(hex-encode-str bytes)
source

hmac-sha-256clj

(hmac-sha-256 key data)
source

presignclj

(presign credentials url)
(presign credentials
         url
         {:keys [ref-time region expires]
          :or {ref-time (Date.) region "us-east-1" expires "3600"}})

Take an URL for a S3 object and returns a string with a presigned GET-URL for that particular object. Takes the following options (a map) as the last argument, the map value shows the default values: {:ref-time (java.util.Date.) ; timestamp incorporated into the signature :expires "3600" ; signature expires x seconds after ref-time :region "us-east-1"} ; signature locked to AWS region

By default credentials are read from standard AWS location.

Take an URL for a S3 object and returns a string with a presigned GET-URL
for that particular object.
Takes the following options (a map) as the last argument,
the map value shows the default values:
    {:ref-time (java.util.Date.) ; timestamp incorporated into the signature
     :expires "3600"           ; signature expires x seconds after ref-time
     :region "us-east-1"}      ; signature locked to AWS region

By default credentials are read from standard AWS location.
sourceraw docstring

sign-requestclj

(sign-request
  client
  {:keys [body headers method url] :as request}
  {:keys [ref-time region service]
   :or {region (:region client) service "execute-api" ref-time (Date.)}})
source

signatureclj

(signature credentials
           canonical-url
           {:keys [scope method timestamp region service query-params
                   content-sha256 signed-headers]})
AWS specification: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
Inspired by https://gist.github.com/souenzzo/21f3e81b899ba3f04d5f8858b4ecc2e9
sourceraw docstring

unreserved-charsclj

source

uri-encodeclj

(uri-encode skip-chars uri)
source

url-unreserved-charsclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close