Ñò ÓyJc @sçddkZddklZddkZddklZddklZddklZddklZdZdZ d e fd „ƒYZ d „Z d „Z d e fd„ƒYZd„Zd„Zd„Zdefd„ƒYZdS(iÿÿÿÿN(tStringIO(t IIdentifier(tIAuthenticator(t IChallenger(tIMetadataProviders%-- repoze.who request started (%s) --s#-- repoze.who request ended (%s) --t!PluggableAuthenticationMiddlewarecBsSeZdeidd„Zd„Zd„Zd„Zd„Z d„Z d„Z RS( t REMOTE_USERc Csìt||||ƒ\} } | |_| |_||_||_||_| |_d|_t |t i ƒo ||_no|ogt i |ƒ} d}t i |ƒ}| i|ƒt i dƒ|_|ii| ƒ|ii| ƒndS(Ns%(asctime)s %(message)ss repoze.who(tmake_registriestregistryt name_registrytappt classifiertchallenge_decidertremote_user_keytNonetloggert isinstancetloggingtLoggert StreamHandlert Formattert setFormattert addHandlertsetLevel(tselfR t identifierstauthenticatorst challengerst mdprovidersR R t log_streamt log_levelR t iregistryt nregistrythandlertfmtt formatter((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyt__init__s&          cCs!|i|jo|i||ƒS|iddƒ}|i|d<|i|d<|i|d<|i}|o|it|ƒ|i|ƒ}|o|id|ƒd}d}d}|i ||ƒ} | oƒ|i ||| ƒ} | oc| i ƒ| d} | \} } }}}t |ƒ}|i |||ƒ||d<|||iRt candidatestpluginstresultstpluginR@((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR)–s(     cCsL|iitdƒ}tt||ƒ}x|D]}|i||ƒq.WdS(N((RR&RRLR-(RR;R>R@RORPRR((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR-®s   cCs||i}|iitgƒ}|o|iid|ƒtt||ƒ}|o|iid||fƒ|i|ƒ\}}}d} xÐ|D]È} |} x¯|D]§\} } | i|| ƒ}|dj oT|o|i d| |fƒ|| d<| | f}|i || | | |fƒn|o|i d| |fƒ| d7} q¤W| d7} q‘W|o|i d|fƒ|S( Ns#authenticator plugins registered %ss9authenticator plugins matched for classification "%s": %sisuserid returned from %s: "%s"srepoze.who.userids no userid returned from %s: (%s)isidentities authenticated: %s( RRR&RR'RLt_filter_preauthenticatedR*RRMRN(RR;R>t identitiesRRORPRQt id_rank_startt auth_rankRRtidentifier_rankRAR@R?RE((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR*µs@         c CsÃ|i}g}|}d}x—|D]}|\}}|idƒ} | dj oa|o|id|| fƒd|f} |i| d||| fƒ|d7}|i|ƒq#q#W|||fS(Nisrepoze.who.userids;userid preauthenticated by %s: "%s" (repoze.who.userid set)i(RR&RR'RNtremove( RRTRRQtnew_identitiesRWtthingRAR@R?RE((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyRSÞs$      c Cs)|i}g}|oK|i||ƒ}|djo g}qa|o|id||fƒn|iitdƒ} |o|id| ƒtt| |ƒ} |o|id|| fƒxP| D]H} | i||||ƒ} | dj o|o|id| ƒ| SqÅW|o |idƒdS(Ns"forgetting via headers from %s: %sschallengers registered: %ss/challengers matched for classification "%s": %ss0challenger plugin %s "challenge" returned an appsno challenge app returned(( RtforgetRR'RR&RRLR5( RR;R>R3t app_headersRAR@Rtforget_headersRORPRRR ((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR5ös4         N( t__name__t __module__RRtINFOR$RKR)R-R*RSR5(((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR s  i   ) cs1xˆD] }|‰PqW‡‡fd†}|ƒS(s  This function returns a generator that behaves exactly the same as the original. It's only difference is it pulls the first iteration off and caches it to trigger any immediate side effects (in a WSGI world, this ensures start_response is called). c3sˆVxˆD] }|Vq WdS(N((titer(tresulttfirst(s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyRG)s((RbRaRG((RbRcs9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR2s cCsug}xh|D]`}t|dhƒ}|i|ƒ}|p|i|ƒq n||jo|i|ƒq q W|S(Ntclassifications(tgetattrR&RN(tifaceRPR>RbRRtplugin_classificationstiface_classifications((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyRL0s  R/cBs&eZd„Zdd„Zd„ZRS(cCs=||_d|_g|_d|_tƒ|_t|_dS(N( R<RR3R4texc_infoRtbuffertFalseR1(RR<((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR$?s      cCs.||_||_||_t|_|iiS(N(R4R3RitTrueR1Rjtwrite(RR3R4Ri((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR0Js     cCsš|p g}n|i|}|i|i||iƒ}|oV|iidƒ|iiƒ}|o||ƒnt|dƒo|iƒq–ndS(Nitclose( R4R<R3RiRjtseektgetvaluethasattrRn(Rt extra_headersR4Rmtvalue((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR9Rs  N(R^R_R$RR0R9(((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR/>s cCsßddkl}ddkl}ddkl}ddkl}ddkl }t ƒ}d}x1ddgD]#\} } |i d | | fƒqlW|i d ƒd „} ||| ƒ} |d ƒ} |ddƒ}|dƒ}|dddƒ}hdgt 6dgt6|_d|fd|fd| fg}d| fg}d|fd| fg}g}ddkl}ddkl}d}ddk}|iidƒo ti}nt|||||||d|dtiƒ}|S(sG Functionally equivalent to [plugin:form] use = repoze.who.plugins.form.FormPlugin rememberer_name = cookie login_form_qs=__do_login [plugin:cookie] use = repoze.who.plugins.cookie:InsecureCookiePlugin cookie_name = oatmeal [plugin:basicauth] use = repoze.who.plugins.basicauth.BasicAuthPlugin realm = repoze.who [plugin:htpasswd] use = repoze.who.plugins.htpasswd.HTPasswdPlugin filename = <...> check_fn = repoze.who.plugins.htpasswd:crypt_check [general] request_classifier = repoze.who.classifiers:default_request_classifier challenge_decider = repoze.who.classifiers:default_challenge_decider [identifiers] plugins = form:browser cookie basicauth [authenticators] plugins = htpasswd [challengers] plugins = form:browser basicauth iÿÿÿÿ(tBasicAuthPlugin(tAuthTktCookiePlugin(tInsecureCookiePlugin(t FormPlugin(tHTPasswdPlugintaatadmintchriss%s:%s icSs ||jS(N((tpasswordthashed((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pytcleartext_checkŒss repoze.whotsecrettauth_tkttoatmealt __do_logintrememberer_nametbrowsertformt basicauththtpasswd(tdefault_request_classifier(tdefault_challenge_deciderNtWHO_LOGRR(RzRz(R{R{(trepoze.who.plugins.basicauthRttrepoze.who.plugins.auth_tktRutrepoze.who.plugins.cookieRvtrepoze.who.plugins.formRwtrepoze.who.plugins.htpasswdRxRRmRoRRRdtrepoze.who.classifiersRˆR‰RtosR;R&tsyststdoutRRtDEBUG(R t global_confRtRuRvRwRxtiotsalttnameR|R~R‡R†R€tcookieR…RRRRRˆR‰RR‘t middleware((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pytmake_test_middleware_sP#       !   cCs'ddkl}|||dtƒdS(Niÿÿÿÿ(t verifyObjectt tentative(tzope.interface.verifyRœRl(RRRfRœ((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pytverify¬sc Csðddkl}h}h}xÇ|tf|tf|tf|tfgD]›\}}xŒ|D]„\} } yt| |ƒWn;|j o/} t| ƒ} tt| ƒd| ƒ‚nX|i |gƒ} | i | ƒ| || (tid(R((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyt__repr__És(R^R_t__doc__R©t__str__(((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyR,Æs (RRR’trepoze.who.interfacesRRRRR(R:tobjectRR2RLR/R›RŸRtdictR,(((s9/usr/lib/python2.6/site-packages/repoze/who/middleware.pyts"  ÿ  ! M