Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | me@jspha.com |
Safe Haskell | None |
- oauth :: CPRG gen => Cred ty -> Server -> Request -> gen -> IO (Request, gen)
- sign :: Oa ty -> Server -> Request -> Request
- makeSignature :: SignatureMethod -> ByteString -> ByteString -> ByteString
- augmentRequest :: ParameterMethod -> Query -> Request -> Request
- canonicalBaseString :: Oa ty -> Server -> Request -> ByteString
- canonicalParams :: Oa ty -> Server -> Request -> ByteString
- oauthParams :: Oa ty -> Server -> Query
- canonicalUri :: Request -> ByteString
- bodyParams :: Request -> Query
- queryParams :: Request -> Query
Primary interface
The oauth
and sign
commands can be used as low level signing
primitives, and they are indeed used to build the Network.OAuth.Stateful
interface exported by default.
oauth :: CPRG gen => Cred ty -> Server -> Request -> gen -> IO (Request, gen)Source
Sign a request with a fresh set of parameters.
Low-level interface
makeSignature :: SignatureMethod -> ByteString -> ByteString -> ByteStringSource
augmentRequest :: ParameterMethod -> Query -> Request -> RequestSource
Augments whatever component of the Request
is specified by
ParameterMethod
with one built from the apropriate OAuth parameters
(passed as a Query
).
Currently this actually replaces the Authorization
header if one
exists. This may be a bad idea if the realm
parameter is pre-set,
perhaps.
TODO: Parse Authorization
header and augment it.
Currently this actually replaces the entity body if one exists. This is definitely just me being lazy.
TODO: Try to parse entity body and augment it.
canonicalBaseString :: Oa ty -> Server -> Request -> ByteStringSource
canonicalParams :: Oa ty -> Server -> Request -> ByteStringSource
oauthParams :: Oa ty -> Server -> QuerySource
bodyParams :: Request -> QuerySource
Queries a Request
body and tries to interpret it as a set of OAuth
valid parameters. It makes the assumption that if the body type is a
streaming variety then it is not a set of OAuth parameters---dropping this
assumption would prevent this from being pure.
queryParams :: Request -> QuerySource