openid-0.2.1.0: An implementation of the OpenID-2.0 spec.

Copyright(c) Trevor Elliott 2008
LicenseBSD3
MaintainerStability :
Portability
Safe HaskellNone
LanguageHaskell98

Network.OpenID.Utils

Contents

Description

 

Synopsis

General Helpers

readMaybe :: Read a => String -> Maybe a Source #

Read, maybe.

breaks :: (a -> Bool) -> [a] -> [[a]] Source #

Break up a string by a predicate.

split :: (a -> Bool) -> [a] -> ([a], [a]) Source #

Spit a list into a pair, removing the element that caused the predicate to succeed.

roll :: [Word8] -> Integer Source #

Build an Integer out of a big-endian list of bytes.

unroll :: Integer -> [Word8] Source #

Turn an Integer into a big-endian list of bytes

btwoc :: [Word8] -> [Word8] Source #

Pad out a list of bytes to represent a positive, big-endian list of bytes.

OpenID Defaults

defaultModulus :: Integer Source #

Default modulus for Diffie-Hellman key exchange.

openidNS :: String Source #

The OpenID-2.0 namespace.

MonadLib helpers

readM :: (ExceptionM m e, Read a) => e -> String -> m a Source #

Read inside of an Exception monad

lookupParam :: ExceptionM m Error => String -> Params -> m String Source #

Lookup parameters inside an exception handling monad

readParam :: (Read a, ExceptionM m Error) => String -> Params -> m a Source #

Read a field

withResponse :: ExceptionM m Error => Either ConnError (Response String) -> (Response String -> m a) -> m a Source #

Make an HTTP request, and run a function with a successful response