hoauth-0.1.1: A Haskell implementation of OAuth 1.0 protocol.Source codeContentsIndex
Network.Protocol.OAuth.Consumer
Description

A pure library that implements oauth authentication protocol as defined in http://oauth.net/core/1.0a.

Refer to http://oauth.net/ for more information about the oauth protocol.

Synopsis
data Token
data Consumer
= Unauthenticated String String
| Authenticated String String Token
request :: (Signer s, Show s) => Consumer -> s -> Request -> Request
response :: Consumer -> ByteString -> Maybe Consumer
oauth_token :: Token -> String
oauth_token_secret :: Token -> String
oauth_extra :: Token -> [Parameter]
plaintext_signature :: Consumer -> Method
hmacsha1_signature :: Consumer -> Method
Documentation
data Token Source
OAuth uses Tokens generated by the Service Provider instead of the User's credentials in Protected Resources requests.
show/hide Instances
data Consumer Source
The application which needs to authenticate using oauth.
Constructors
Unauthenticated String StringCreates a consumer with consumer_key and consumer_secret
Authenticated String String TokenA consumer with consumer_key, consumer_secret and a Token
show/hide Instances
request :: (Signer s, Show s) => Consumer -> s -> Request -> RequestSource

Sign a request for oauth request. Use this either to sign requests with a proper Access token or to use the oauth protocol to get a token from service provider.

The request you provide must contain oauth_nonce and oauth_timestamp parameters properly defined.

response :: Consumer -> ByteString -> Maybe ConsumerSource
Process the response of the service provider. The response should be an urlencoded string.
oauth_token :: Token -> StringSource
oauth_token_secret :: Token -> StringSource
oauth_extra :: Token -> [Parameter]Source
plaintext_signature :: Consumer -> MethodSource
The PLAINTEXT signature for a given consumer
hmacsha1_signature :: Consumer -> MethodSource
The HMAC-SHA1 signature for a given consumer
Produced by Haddock version 2.6.0