Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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 = ByteString Source
type Endpoint = ByteString Source
type Path = ByteString Source
type SecretKey = ByteString Source
Building signature
stringToSign :: Method -> Endpoint -> Path -> SimpleQuery -> ByteString Source
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 -> ByteString Source
signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> SimpleQuery -> ByteString Source
Make signature from a parameter list.
signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> Query -> ByteString Source
Make signature from a QueryString
.