OwlCyberSecurity - MANAGER
Edit File: basic.pyc
� �t�ac @ sf d d l m Z m Z d d l m Z m Z d d l m Z d d l m Z d e f d � � YZ d S( i����( t credentialst error( t succeedt fail( t ICredentialFactory( t implementst BasicCredentialFactoryc B s9 e Z d Z e e � d Z d � Z d � Z d � Z RS( s: Credential Factory for HTTP Basic Authentication t basicc C s | | _ d S( N( t realm( t selfR ( ( s$ /opt/cpanel-ccs/txweb2/auth/basic.pyt __init__* s c C s t i | j d 6� S( s9 @see L{ICredentialFactory.getChallenge} R ( R R ( R t peer( ( s$ /opt/cpanel-ccs/txweb2/auth/basic.pyt getChallenge- s c C s~ y | d j d � } Wn t j d � � n X| j d d � } t | � d k rg t t j | � � St t j d � � Sd S( sc Decode the credentials for basic auth. @see L{ICredentialFactory.decode} s ===t base64s Invalid credentialst :i i N( t decodeR t LoginFailedt splitt lenR R t UsernamePasswordR ( R t responset requestt creds( ( s$ /opt/cpanel-ccs/txweb2/auth/basic.pyR 3 s ( t __name__t __module__t __doc__R R t schemeR R R ( ( ( s$ /opt/cpanel-ccs/txweb2/auth/basic.pyR ! s N( t twisted.credR R t twisted.internet.deferR R t txweb2.auth.interfacesR t zope.interfaceR t objectR ( ( ( s$ /opt/cpanel-ccs/txweb2/auth/basic.pyt <module> s