For the impatient:
  Download comments_openid.py 0.4
  Download Python OpenID libraries
  Download comments.py and session.py
  OpenID home page
  PyBlosxom home page

comments_openid.py is a PyBlosxom plugin that allows OpenID-authenticated comments. When used in conjunction with the comments plugin, it allows people to comment on your PyBlosxom-based site using their OpenID provider. In addition, if their provider supports the Simple Registration Extension, it displays their nickname instead of their OpenID URL under the comment.

To use it, first download and install the Python OpenID libraries. Then, download comments.py and session.py plugins and enable comments on your blog.

When you’re ready, add a note in your comments-form template that the URL input field now supports OpenId:

<input name="url" id="comment-url" type="text" value="$cmt_link" />
<label for="url">Web site or <a href="http://openid.net/">OpenID</a></label>

Then, add this setting to your config.py:

# A directory for the OpenID library to use to store information about
# OpenID servers and logins. This directory should be outside of your
# public web space.
 py['openid_store_dir'] = '/path/to/data/directory/'

Change the path to an appropriate directory on your web server, and you should be good to go!

Apart from openid_store_dir, there are several configuration settings that allow you to control comment access based on OpenID:

# Trust root for the OpenID Request. Defaults to the base URL of your page.
# (All URLs should fall under this directory.)
py['openid_trust_root']  

# If this is set to True, do not allow comments unless OpenID
# authentication succeeds. Defaults to False.
py['openid_required']  

# List of patterns for identities and OpenID servers to always reject. The
# patterns follow the form of OpenID trust roots, which are basically URLs
# that allow * in the domain name to match any subdomain. For more
# details, see the entry on openid.trust_root in
# http://openid.net/specs.bml#mode-checkid_immediate.
# Both default to empty lists.
py['openid_reject_identity']  
py['openid_reject_server']  

# Lists of patterns for identities and servers to allow. If either of
# these options are set, only OpenID URLs that match are allowed. Both
# default to empty lists.
py['openid_allow_identity']  
py['openid_allow_server']  

Copyright 2006-2007 Josh Hoyt and Kevin Turner of JanRain, original authors, and Ryan Barrett, current maintainer. Distributed under the GPL. Originally released on openidenabled.com and moved to snarfed.org on September 6, 2007.

8 thoughts on “

  1. that strange ,,,, python-openid supplied consumer.py test successfully receives Full Name and Nickname fields of registration extension(i’ve modified your server plugin) … however this doesn’t happen here

  2. This openid comment plugin no longer works with
    the recent python-openid library in which consumer.complete
    requires one additional argument which is the URL
    to return to.

Leave a Reply

Your email address will not be published. Required fields are marked *