Safe Haskell | None |
---|
- type Method = ByteString
- type Endpoint = ByteString
- type Path = ByteString
- type SecretKey = ByteString
- data SignatureMethod = HmacSHA256
- stringToSign :: Method -> Endpoint -> Path -> SimpleQuery -> ByteString
- stringToSign' :: Method -> Endpoint -> Path -> Query -> ByteString
- signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> SimpleQuery -> ByteString
- signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> Query -> ByteString
Types
type Method = ByteStringSource
type Endpoint = ByteStringSource
type Path = ByteStringSource
type SecretKey = ByteStringSource
Building signature
stringToSign :: Method -> Endpoint -> Path -> SimpleQuery -> ByteStringSource
Make a string for making signature.
>>>
stringToSign "GET" "ec2.amazonaws.com" "/" [("key1", "value1"), ("key2", "value2")]
"GET\nec2.amazonaws.com\n/\nkey1=value1&key2=value2"
stringToSign' :: Method -> Endpoint -> Path -> Query -> ByteStringSource
signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> SimpleQuery -> ByteStringSource
Make signature from a parameter list.
signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> Query -> ByteStringSource
Make signature from a QueryString
.