hoauth-0.1.2: A Haskell implementation of OAuth 1.0a protocol.Source codeContentsIndex
Implements PLAINTEXT and HMAC-SHA1 signatures of oauth spec http://oauth.net/core/1.0a#signing_process
data Method
= PLAINTEXT String (Maybe String)
| HMAC_SHA1 String (Maybe String)
| RSA_SHA1 PrivateKey
class Signer a where
sign :: a -> Request -> String
data Method Source
The signature method which will be used to sign requests.
PLAINTEXT String (Maybe String)The PLAINTEXT consumer_key token_secret method does not provide any security protection and SHOULD only be used over a secure channel such as HTTPS. It does not use the Signature Base String.
HMAC_SHA1 String (Maybe String)The HMAC_SHA1 consumer_key token_secret signature method uses the HMAC-SHA1 signature algorithm as defined in http://tools.ietf.org/html/rfc2104 where the Signature Base String is the text and the key is the concatenated values (each first encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an & character (ASCII code 38) even if empty.
RSA_SHA1 PrivateKeyThe RSA_SHA1 rsa_privkey signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a verified way to the Service Provider.
show/hide Instances
class Signer a whereSource
Functions to sign requests according oauth spec.
:: aThe signature method to use
-> Request
-> StringThe signature
For a given request, this function is able sign it using the method specified. The full description of this process is described in depth at http://oauth.net/core/1.0a#signing_process.
show/hide Instances
Produced by Haddock version 2.6.0