Deriving more instances- from Jeremy Shaw

This commit is contained in:
Michael Snoyman 2010-10-23 19:33:52 +02:00
parent b901357db4
commit 221ee0ad17
4 changed files with 12 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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,

View File

@ -1,5 +1,5 @@
name: authenticate
version: 0.7.0
version: 0.7.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>