Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Really simple OpenID authentication for haskell

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 src
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 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.