OwlCyberSecurity - MANAGER
Edit File: digest.pyc
� �t�ac @ s d d l m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d l Z e � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( i����( t error( t inlineCallbackst returnValue( t DigestCredentialFactory( t DigestedCredentials( t Token( t parseKeyValue( t split( t tokenize( t Logger( t Memcacher( t implementst InterfaceNt IDigestCredentialsDatabasec B s2 e Z d Z d � Z d � Z d � Z d � Z RS( s� An interface to a digest credentials database that is used to hold per-client digest credentials so that fast re-authentication can be done with replay attacks etc prevented. c C s d S( s� See whether the matching key exists. @param key: the key to check. @type key: C{str}. @return: C{True} if the key exists, C{False} otherwise. N( ( t selft key( ( s1 /opt/cpanel-ccs/twistedcaldav/directory/digest.pyt has_key2 s c C s d S( s Store per-client credential information the first time a nonce is generated and used. @param key: the key for the data to store. @type key: C{str} @param value: the data to store. @type value: any. N( ( R R t value( ( s1 /opt/cpanel-ccs/twistedcaldav/directory/digest.pyt set= s c C s d S( so Validate client supplied credentials by comparing with the cached values. If valid, store the new cnonce value in the database so that it can be used on the next validate. @param key: the key to check. @type key: C{str}. @return: the value for the corresponding key, or C{None} if the key is not found. N( ( R R ( ( s1 /opt/cpanel-ccs/twistedcaldav/directory/digest.pyt getH s c C s d S( s� Remove the record associated with the supplied key. @param key: the key to remove. @type key: C{str} N( ( R R ( ( s1 /opt/cpanel-ccs/twistedcaldav/directory/digest.pyt deleteT s ( t __name__t __module__t __doc__R R R R ( ( ( s1 /opt/cpanel-ccs/twistedcaldav/directory/digest.pyR , s t DigestCredentialsMemcachec B s3 e Z e e � d Z d � Z d � Z d � Z RS( i i<