403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/paste/auth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/auth/basic.pyo
Ñò
‘ÊIc@s˜dZddklZddkTdefd„ƒYZdefd„ƒYZeZdgZd„Z	d	e
jo#dd
kZeidei
ƒ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*tAuthBasicAuthenticatorcBs5eZdZdZd„Zd„Zd„ZeZRS(s5
    implements ``Basic`` authentication details
    tbasiccCs||_||_dS(N(trealmtauthfunc(tselfRR((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyt__init__ s	cCs#tid|iƒ}td|ƒS(NsBasic realm="%s"theaders(tWWW_AUTHENTICATEttuplesRR(Rthead((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pytbuild_authentication$scCs¦t|ƒ}|p|iƒS|iddƒ\}}d|iƒjo|iƒS|iƒidƒ}|iddƒ\}}|i|||ƒo|S|iƒS(Nt iRtbase64t:(t
AUTHORIZATIONRtsplittlowertstriptdecodeR(Rtenviront
authorizationtauthmethtauthtusernametpassword((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pytauthenticate(s(t__name__t
__module__t__doc__ttypeRRRt__call__(((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyRs			
tAuthBasicHandlercBs eZdZd„Zd„ZRS(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(tapplicationRR(RR"RR((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyRRs	cCszt|ƒ}|pW|i|ƒ}t|tƒo$ti|dƒti||ƒqj|i||ƒSn|i||ƒS(NR(tREMOTE_USERRt
isinstancetstrt	AUTH_TYPEtupdatetwsgi_applicationR"(RRtstart_responseRtresult((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyR Vs(RRRRR (((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyR!7s	cKs8ddkl}ddk}||ƒ}t|||ƒ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ÿÿÿÿ(teval_importN(tpaste.util.import_stringR+ttypesR!(tapptglobal_confRRtkwR+R-((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyt
make_basicest__main__Ntoptionflags(Rtpaste.httpexceptionsRtpaste.httpheaderstobjectRR!t
middlewaret__all__R1RtdoctestttestmodtELLIPSIS(((s4/usr/lib/python2.6/site-packages/paste/auth/basic.pyt<module>s
*		


Youez - 2016 - github.com/yon3zu
LinuXploit