ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ aNc@sdZddlmZddlTdefdYZdefdYZeZdgZdZ d e krdd l Z e j d e j nd S( s Basic HTTP/1.0 Authentication This module implements ``Basic`` authentication as described in HTTP/1.0 specification [1]_ . Do not use this module unless you are using SSL or need to work with very out-dated clients, instead use ``digest`` authentication. >>> from paste.wsgilib import dump_environ >>> from paste.httpserver import serve >>> # from paste.auth.basic import AuthBasicHandler >>> realm = 'Test Realm' >>> def authfunc(environ, username, password): ... return username == password >>> serve(AuthBasicHandler(dump_environ, realm, authfunc)) serving on... .. [1] http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#BasicAA i(tHTTPUnauthorized(t*tAuthBasicAuthenticatorcBs5eZdZdZdZdZdZeZRS(s5 implements ``Basic`` authentication details tbasiccCs||_||_dS(N(trealmtauthfunc(tselfRR((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyt__init__ s cCs#tjd|j}td|S(NsBasic realm="%s"theaders(tWWW_AUTHENTICATEttuplesRR(Rthead((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pytbuild_authentication$scCst|}|s|jS|jdd\}}d|jkrP|jS|jjd}|jdd\}}|j|||r|S|jS(Nt iRtbase64t:(t AUTHORIZATIONR tsplittlowertstriptdecodeR(Rtenviront authorizationtauthmethtauthtusernametpassword((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyt authenticate(s   (t__name__t __module__t__doc__ttypeRR Rt__call__(((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyRs    tAuthBasicHandlercBs eZdZdZdZRS(s/ HTTP/1.0 ``Basic`` authentication middleware Parameters: ``application`` The application object is called only upon successful authentication, and can assume ``environ['REMOTE_USER']`` is set. If the ``REMOTE_USER`` is already set, this middleware is simply pass-through. ``realm`` This is a identifier for the authority that is requesting authorization. It is shown to the user and should be unique within the domain it is being used. ``authfunc`` This is a mandatory user-defined function which takes a ``environ``, ``username`` and ``password`` for its first three arguments. It should return ``True`` if the user is authenticated. cCs||_t|||_dS(N(t applicationRR(RR"RR((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyRRs cCsvt|}|sf|j|}t|trStj|dtj||qf|j||Sn|j||S(NR(t REMOTE_USERRt isinstancetstrt AUTH_TYPEtupdatetwsgi_applicationR"(RRtstart_responseRtresult((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyR Vs (RRRRR (((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyR!7s cKsVddlm}ddl}||}t||jsFtdt|||S(s Grant access via basic authentication Config looks like this:: [filter:grant] use = egg:Paste#auth_basic realm=myrealm authfunc=somepackage.somemodule:somefunction i(t eval_importNs#authfunc must resolve to a function(tpaste.util.import_stringR+ttypesR$t FunctionTypetAssertionErrorR!(tappt global_confRRtkwR+R-((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyt make_basices   t__main__Nt optionflags(Rtpaste.httpexceptionsRtpaste.httpheaderstobjectRR!t middlewaret__all__R3RtdoctestttestmodtELLIPSIS(((sA/opt/alt/python27/lib/python2.7/site-packages/paste/auth/basic.pyts *