Sunday, September 16, 2007

Haskell and OpenID


Today I've been doing some investigation about creating an openid implementation in Haskell. There are lots of implementations in different languages, but surprisingly none in C. That would probably be the easiest language to create a binding for.
A few approaches I'm thinking about:
  • Creating a binding from Haskell to another language. This wouldn't be a real implementation, just a binding, but there's no C implementation listed... it's likely that there is some out there, though.
  • Creating a simple client-side only implementation that's just an experiment... leaving out a lot of the details like encryption, state, & delegation. Then building that up over time.
  • Or maybe jumping right to implementing The 2.0 version to try to make a reference implementation in Haskell. Who knows, maybe it'll get some people attracted to Haskell :)


    Click "read more" to read more :)


    I created an OpenID Identity at myopenid.com and created a delegation for http://ipj.syntaxpolice.org, so now I have my own identity at my own server. This is actually really easy:
    How to create an OpenID identity and delegate it to a personal web server:
  • Create an identity at some OpenID provider.
  • Create an HTML document on your Unix server someplace like "/var/www/ipj/index.html" and add this content:
     <html>
        <head>
           <title>Isaac Potoczny-Jones OpenID</title>
           <link rel="openid.server"   href="https://www.myopenid.com/server">
           <link rel="openid.delegate" href="http://isaac.potoczny-jones.myopenid.com">
        </head>
        <body>
           <p><a href="mailto:ijones@syntaxpolice.org">Isaac Potoczny-Jones</a></p>
    
        </body>
     </html>
    
  • Create a virtual server in apache by creating a file like "/etc/apache2/sites-enabled/ipj.conf" with this kind of contents:
    <VirtualHost *>
     ServerName  isaac.potoczny-jones.syntaxpolice.org
     ServerAlias ipj.syntaxpolice.org
     DocumentRoot /var/www/ipj
    </VirtualHost>
    
  • Then restart apache
  • And try logging into LJ or something. The next version of drupal supports OpenID, so when I upgrade I'll probably use my own server, presumably with the same identity.
    But the thing is, I haven't picked a new nick since I got married. Should I be: isaac.potoczny-jones, ipojo, ipj, or just isaac?
    peace,
    ipojo
  • No comments:

    Post a Comment