def cleanup_associations(self, request, queryset): store = DjangoOpenIDStore() count = store.cleanupAssociations() self.message_user(request, "%d expired associations removed" % count)
def cleanup_nonces(self, request, queryset): store = DjangoOpenIDStore() count = store.cleanupNonces() self.message_user(request, "%d expired nonces removed" % count)
def make_consumer(request): """Create an OpenID Consumer object for the given Django request.""" # Give the OpenID library its own space in the session object. session = request.session.setdefault('OPENID', {}) store = DjangoOpenIDStore() return Consumer(session, store)