Skip to content
Really simple OpenID authentication for haskell
Haskell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
src/Network/OpenID
README.markdown
Setup.hs
openid-simple.cabal

README.markdown

Reall simple OpenID authentication in haskell.

Synopsis

import qualified Network.OpenID.Simple as ID

main = do
    -- authenticate via substack.myopenid.com and return to http://substack.net/
    session <- ID.authenticate "substack.myopenid.com" "http://substack.net/"

    -- user is forwarded here:
    putStrLn $ "Location: " ++ ID.authURI session

    -- user was returned to this page:
    uri <- getLine

    ok <- ID.verify session uri

    putStrLn $ case ok of
        Nothing -> "Verified as " ++ ID.identity session
        Just err -> "Failed to verify authentication: " ++ err
Something went wrong with that request. Please try again.