Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / plugins / | server ip : 104.21.89.46 your ip : 172.69.130.131 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/plugins/cred_anonymous.py |
Size | 969 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 14-Feb-2011 11:45 |
Last accessed | 27-Apr-2025 09:57 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
# -*- test-case-name: twisted.test.test_strcred -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Cred plugin for anonymous logins.
"""
from zope.interface import implements
from twisted import plugin
from twisted.cred.checkers import AllowAnonymousAccess
from twisted.cred.strcred import ICheckerFactory
from twisted.cred.credentials import IAnonymous
anonymousCheckerFactoryHelp = """
This allows anonymous authentication for servers that support it.
"""
class AnonymousCheckerFactory(object):
"""
Generates checkers that will authenticate an anonymous request.
"""
implements(ICheckerFactory, plugin.IPlugin)
authType = 'anonymous'
authHelp = anonymousCheckerFactoryHelp
argStringFormat = 'No argstring required.'
credentialInterfaces = (IAnonymous,)
def generateChecker(self, argstring=''):
return AllowAnonymousAccess()
theAnonymousCheckerFactory = AnonymousCheckerFactory()
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Cred plugin for anonymous logins.
"""
from zope.interface import implements
from twisted import plugin
from twisted.cred.checkers import AllowAnonymousAccess
from twisted.cred.strcred import ICheckerFactory
from twisted.cred.credentials import IAnonymous
anonymousCheckerFactoryHelp = """
This allows anonymous authentication for servers that support it.
"""
class AnonymousCheckerFactory(object):
"""
Generates checkers that will authenticate an anonymous request.
"""
implements(ICheckerFactory, plugin.IPlugin)
authType = 'anonymous'
authHelp = anonymousCheckerFactoryHelp
argStringFormat = 'No argstring required.'
credentialInterfaces = (IAnonymous,)
def generateChecker(self, argstring=''):
return AllowAnonymousAccess()
theAnonymousCheckerFactory = AnonymousCheckerFactory()