Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Django implementation of the webfinger server protocol

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 webfinger
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.rst
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 setup.py
README.rst

Initial version... needs some major refactoring

django-webfinger

Provide webfinger service.

http://code.google.com/p/webfinger/wiki/WebFingerProtocol

Requirements

python >= 2.5

python-xrd

django >= 1.0

django-wellknown

Installation

Be sure to add webfinger to INSTALLED_APPS in settings.py. Additionally, add the following entry to urls.py:

url(r'^webfinger/', include('webfinger.urls')),

Configure the webfinger handler in settings.py:

WEBFINGER_HANDLER = 'path.to.handler.func'

Usage

Handler Function

from webfinger import rel
import datetime

def handler_func(request, acct, xrd):
        # acct.userinfo is the username
        # acct.host is the host
    xrd.aliases.append('http://example.com/profile/%s/' % acct.userinfo)
    xrd.expires = datetime.datetime.utcnow() + datetime.timedelta(0, 10)
    xrd.links.append(Link(
        rel=rel.AUTHOR,
        href='http://jeremy.carbauja.com',
        type='text/html',
    ))
Something went wrong with that request. Please try again.