-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Authentication methods for Haskell web applications. -- -- Focus is on third-party authentication methods, such as OpenID, rpxnow -- and Facebook. @package authenticate @version 0.10.4 -- | Module for using a kerberos authentication service. -- -- Please note that all configuration should have been done manually on -- the machine prior to running the code. -- -- On linux machines the configuration might be in etckrb5.conf. -- It's worth checking if the Kerberos service provider (e.g. your -- university) already provide a complete configuration file. -- -- Be certain that you can manually login from a shell by typing -- --
-- kinit username ---- -- If you fill in your password and the program returns no error code, -- then your kerberos configuration is setup properly. Only then can this -- module be of any use. module Web.Authenticate.Kerberos -- | Given the username and password, try login to Kerberos service loginKerberos :: Text -> Text -> IO KerberosAuthResult -- | Occurreable results of a Kerberos login data KerberosAuthResult Ok :: KerberosAuthResult NoSuchUser :: KerberosAuthResult WrongPassword :: KerberosAuthResult TimeOut :: KerberosAuthResult UnknownError :: Text -> KerberosAuthResult instance Show KerberosAuthResult module Web.Authenticate.Facebook data Facebook Facebook :: Text -> Text -> Text -> Facebook facebookClientId :: Facebook -> Text facebookClientSecret :: Facebook -> Text facebookRedirectUri :: Facebook -> Text newtype AccessToken AccessToken :: Text -> AccessToken unAccessToken :: AccessToken -> Text getForwardUrlParams :: Facebook -> [(Text, Text)] -> Text getForwardUrlWithState :: Facebook -> [Text] -> Text -> Text getForwardUrl :: Facebook -> [Text] -> Text getAccessToken :: Facebook -> Text -> IO AccessToken getGraphData :: AccessToken -> Text -> IO (Either String Value) getGraphData_ :: AccessToken -> Text -> IO Value -- | Logs out the user from their Facebook session. getLogoutUrl :: AccessToken -> Text -> Text instance Typeable Facebook instance Typeable AccessToken instance Typeable InvalidJsonException instance Show Facebook instance Eq Facebook instance Read Facebook instance Ord Facebook instance Data Facebook instance Show AccessToken instance Eq AccessToken instance Read AccessToken instance Ord AccessToken instance Data AccessToken instance Show InvalidJsonException instance Exception InvalidJsonException module Web.Authenticate.OAuth -- | Data type for OAuth client (consumer). data OAuth OAuth :: String -> String -> String -> String -> SignMethod -> ByteString -> ByteString -> Maybe ByteString -> OAuth -- | Service name oauthServerName :: OAuth -> String -- | URI to request temporary credential oauthRequestUri :: OAuth -> String -- | Uri to obtain access token oauthAccessTokenUri :: OAuth -> String -- | Uri to authorize oauthAuthorizeUri :: OAuth -> String -- | Signature Method oauthSignatureMethod :: OAuth -> SignMethod -- | Consumer key oauthConsumerKey :: OAuth -> ByteString -- | Consumer Secret oauthConsumerSecret :: OAuth -> ByteString -- | Callback uri to redirect after authentication oauthCallback :: OAuth -> Maybe ByteString -- | Data type for signature method. data SignMethod PLAINTEXT :: SignMethod HMACSHA1 :: SignMethod RSASHA1 :: PrivateKey -> SignMethod -- | Data type for redential. data Credential Credential :: [(ByteString, ByteString)] -> Credential unCredential :: Credential -> [(ByteString, ByteString)] data OAuthException OAuthException :: String -> OAuthException -- | Empty credential. emptyCredential :: Credential -- | Insert an oauth parameter into given Credential. insert :: ByteString -> ByteString -> Credential -> Credential -- | Remove an oauth parameter for key from given Credential. delete :: ByteString -> Credential -> Credential -- | Convenient method for inserting multiple parameters into credential. inserts :: [(ByteString, ByteString)] -> Credential -> Credential -- | Add OAuth headers & sign to Request. signOAuth :: OAuth -> Credential -> Request IO -> IO (Request IO) genSign :: MonadIO m => OAuth -> Credential -> Request m -> m ByteString -- | URL to obtain OAuth verifier. authorizeUrl :: OAuth -> Credential -> String -- | Get Access token. getAccessToken, getTokenCredential :: OAuth -> Credential -> IO Credential -- | Get temporary credential for requesting acces token. getTemporaryCredential :: OAuth -> IO Credential -- | Get temporary credential for requesting access token with Scope -- parameter. getTemporaryCredentialWithScope :: ByteString -> OAuth -> IO Credential -- | Get Access token via the proxy. getAccessTokenProxy, getTokenCredentialProxy :: Maybe Proxy -> OAuth -> Credential -> IO Credential -- | Get temporary credential for requesting access token via the proxy. getTemporaryCredentialProxy :: Maybe Proxy -> OAuth -> IO Credential getAccessToken' :: (Request IO -> Request IO) -> OAuth -> Credential -> IO Credential getTemporaryCredential' :: (Request IO -> Request IO) -> OAuth -> IO Credential -- | Encode a string using the percent encoding method for OAuth. paramEncode :: ByteString -> ByteString addScope :: MonadIO m => ByteString -> Request m -> Request m addMaybeProxy :: Maybe Proxy -> Request m -> Request m instance Typeable SignMethod instance Typeable OAuth instance Typeable Credential instance Typeable OAuthException instance Eq PrivateKey instance Ord PrivateKey instance Read PrivateKey instance Data PrivateKey instance Typeable PrivateKey instance Show SignMethod instance Eq SignMethod instance Ord SignMethod instance Read SignMethod instance Data SignMethod instance Show OAuth instance Eq OAuth instance Ord OAuth instance Read OAuth instance Data OAuth instance Show Credential instance Eq Credential instance Ord Credential instance Read Credential instance Data Credential instance Show OAuthException instance Eq OAuthException instance Data OAuthException instance Exception OAuthException -- | OpenIDs for a number of common OPs. When a function takes a -- String parameter, that String is the username. module Web.Authenticate.OpenId.Providers google :: String yahoo :: String livejournal :: String -> String myspace :: String -> String wordpress :: String -> String blogger :: String -> String verisign :: String -> String typepad :: String -> String myopenid :: String -> String claimid :: String -> String module Web.Authenticate.BrowserId -- | Location of the Javascript file hosted by browserid.org browserIdJs :: Text checkAssertion :: Text -> Text -> IO (Maybe Text) module Web.Authenticate.OpenId getForwardUrl :: (MonadIO m, Failure AuthenticateException m, Failure HttpException m) => Text -> Text -> Maybe Text -> [(Text, Text)] -> m Text authenticate :: (MonadIO m, Failure AuthenticateException m, Failure HttpException m) => [(Text, Text)] -> m (Identifier, [(Text, Text)]) data AuthenticateException RpxnowException :: String -> AuthenticateException NormalizationException :: String -> AuthenticateException DiscoveryException :: String -> AuthenticateException AuthenticationException :: String -> AuthenticateException -- | A valid OpenID identifier. newtype Identifier Identifier :: Text -> Identifier identifier :: Identifier -> Text module Web.Authenticate.Rpxnow -- | Information received from Rpxnow after a valid login. data Identifier Identifier :: Text -> [(Text, Text)] -> Identifier identifier :: Identifier -> Text extraData :: Identifier -> [(Text, Text)] -- | Attempt to log a user in. authenticate :: (MonadIO m, Failure HttpException m, Failure AuthenticateException m) => String -> String -> m Identifier data AuthenticateException RpxnowException :: String -> AuthenticateException NormalizationException :: String -> AuthenticateException DiscoveryException :: String -> AuthenticateException AuthenticationException :: String -> AuthenticateException instance Typeable Identifier instance Eq Identifier instance Ord Identifier instance Read Identifier instance Show Identifier instance Data Identifier