1
# -*- test-case-name: twisted.test.test_strcred -*-
3
# Copyright (c) 2007-2008 Twisted Matrix Laboratories.
4
# See LICENSE for details.
7
Cred plugin for anonymous logins.
10
from zope.interface import implements
12
from twisted import plugin
13
from twisted.cred.checkers import AllowAnonymousAccess
14
from twisted.cred.strcred import ICheckerFactory
15
from twisted.cred.credentials import IAnonymous
18
anonymousCheckerFactoryHelp = """
19
This allows anonymous authentication for servers that support it.
23
class AnonymousCheckerFactory(object):
25
Generates checkers that will authenticate an anonymous request.
27
implements(ICheckerFactory, plugin.IPlugin)
28
authType = 'anonymous'
29
authHelp = anonymousCheckerFactoryHelp
30
argStringFormat = 'No argstring required.'
31
credentialInterfaces = (IAnonymous,)
34
def generateChecker(self, argstring=''):
35
return AllowAnonymousAccess()
39
theAnonymousCheckerFactory = AnonymousCheckerFactory()