diff --git a/OpenId2/Types.hs b/OpenId2/Types.hs index 33b1601e..66afab4b 100644 --- a/OpenId2/Types.hs +++ b/OpenId2/Types.hs @@ -17,6 +17,8 @@ module OpenId2.Types ( ) where -- Libraries +import Data.Data (Data) +import Data.Typeable (Typeable) import Web.Authenticate.Internal -- | An OpenID provider. @@ -24,4 +26,4 @@ newtype Provider = Provider { providerURI :: String } deriving (Eq,Show) -- | A valid OpenID identifier. newtype Identifier = Identifier { identifier :: String } - deriving (Eq, Show, Read) + deriving (Eq, Ord, Show, Read, Data, Typeable) diff --git a/Web/Authenticate/Facebook.hs b/Web/Authenticate/Facebook.hs index b0b24a36..3571401d 100644 --- a/Web/Authenticate/Facebook.hs +++ b/Web/Authenticate/Facebook.hs @@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE DeriveDataTypeable #-} module Web.Authenticate.Facebook where import Network.HTTP.Enumerator @@ -9,16 +10,18 @@ import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.ByteString.Lazy as L import qualified Data.ByteString as S import Web.Authenticate.Internal (qsEncode) +import Data.Data (Data) +import Data.Typeable (Typeable) data Facebook = Facebook { facebookClientId :: String , facebookClientSecret :: String , facebookRedirectUri :: String } - deriving (Show, Eq, Read) + deriving (Show, Eq, Read, Ord, Data, Typeable) newtype AccessToken = AccessToken { unAccessToken :: String } - deriving (Show, Eq, Read) + deriving (Show, Eq, Read, Ord, Data, Typeable) getForwardUrl :: Facebook -> [String] -> String getForwardUrl fb perms = concat diff --git a/Web/Authenticate/Rpxnow.hs b/Web/Authenticate/Rpxnow.hs index 740521dc..c60f235a 100644 --- a/Web/Authenticate/Rpxnow.hs +++ b/Web/Authenticate/Rpxnow.hs @@ -33,12 +33,15 @@ import qualified Data.ByteString.Char8 as S import qualified Data.ByteString.Lazy.Char8 as L import Control.Exception (throwIO) import Web.Authenticate.Internal +import Data.Data (Data) +import Data.Typeable (Typeable) -- | Information received from Rpxnow after a valid login. data Identifier = Identifier { identifier :: String , extraData :: [(String, String)] } + deriving (Eq, Ord, Read, Show, Data, Typeable) -- | Attempt to log a user in. authenticate :: (MonadIO m, diff --git a/authenticate.cabal b/authenticate.cabal index 068a533b..3a50de16 100644 --- a/authenticate.cabal +++ b/authenticate.cabal @@ -1,5 +1,5 @@ name: authenticate -version: 0.7.0 +version: 0.7.1 license: BSD3 license-file: LICENSE author: Michael Snoyman