hoauth-0.0.1: A Haskell implementation of OAuth 1.0 protocol.

Network.Protocol.OAuth.Signature

Description

Implements PLAINTEXT and HMAC-SHA1 signatures of oauth spec http://oauth.net/core/1.0a#signing_process

Synopsis

Documentation

data Method Source

The signature method which will be used to sign requests.

Constructors

PLAINTEXT

The PLAINTEXT 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

The HMAC_SHA1 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.

class Signer a whereSource

Functions to sign requests according oauth spec.

Methods

signSource

Arguments

:: a

The signature method to use

-> String

The consumer secret

-> Maybe String

The token secret

-> Request 
-> String

The 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.

Instances