| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/twisted/cred/ |
Upload File : |
ó
[³XMc @ sÖ d d l Z d d l m Z m Z m Z d d l m Z d d l m Z m Z d d l
m Z m Z d e f d „ ƒ YZ
d Z d d d „ ƒ YZ d
d d „ ƒ YZ d d d
„ ƒ YZ d d d „ ƒ YZ e Z d S( iÿÿÿÿN( t
implementst Interfacet Attribute( t defer( t failuret log( t errort credentialst ICredentialsCheckerc B s# e Z d Z e d ƒ Z d „ Z RS( sB
An object that can check sub-interfaces of ICredentials.
sK A list of sub-interfaces of ICredentials which specifies which I may check.c C s d S( s»
@param credentials: something which implements one of the interfaces in
self.credentialInterfaces.
@return: a Deferred which will fire a string which identifies an
avatar, an empty tuple to specify an authenticated anonymous user
(provided as checkers.ANONYMOUS) or fire a Failure(UnauthorizedLogin).
Alternatively, return the result itself.
@see: L{twisted.cred.credentials}
N( ( R ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyt requestAvatarId s ( t __name__t
__module__t __doc__R t credentialInterfacesR ( ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyR s t AllowAnonymousAccessc B s' e Z e e ƒ e j f Z d „ Z RS( c C s
t j t ƒ S( N( R t succeedt ANONYMOUS( t selfR ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyR 8 s ( R
R R R R t
IAnonymousR
R ( ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyR 4 s
t' InMemoryUsernamePasswordDatabaseDontUsec B sN e Z d Z e e ƒ e j e j f Z d „ Z d „ Z
d „ Z d „ Z RS( sk
An extremely simple credentials checker.
This is only of use in one-off test programs or examples which don't
want to focus too much on how credentials are verified.
You really don't want to use this for anything else. It is, at best, a
toy. If you need a simple credentials checker for a real application,
see L{FilePasswordDB}.
c K s
| | _ d S( N( t users( R R ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyt __init__M s c C s | | j | <d S( N( R ( R t usernamet password( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyt addUserP s c C s! | r
| St j t j ƒ ƒ Sd S( N( R t FailureR t UnauthorizedLogin( R t matchedR ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyt _cbPasswordMatchS s c C s^ | j | j k rG t j | j | j | j ƒ j | j t | j ƒ ƒ St j t j
ƒ ƒ Sd S( N( R R R t
maybeDeferredt
checkPasswordt addCallbackR t strt failR R ( R R ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyR Y s (
R
R R R R R t IUsernamePasswordt IUsernameHashedPasswordR
R R R R ( ( ( s9 /usr/lib/python2.7/dist-packages/twisted/cred/checkers.pyR <