Ńň
zJc
@ s d d k Z d d k l Z d d k l Z d d k l Z d d k l Z d d k l Z d d k l
Z
d e f d YZ d
d Z
d S( i˙˙˙˙N( t WWW_AUTHENTICATE( t
AUTHORIZATION( t HTTPUnauthorized( t
implements( t IIdentifier( t IChallengert BasicAuthPluginc B sT e Z e e e d Z d Z d Z d Z d Z d Z
d Z RS( c C s
| | _ d S( N( t realm( t selfR ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt __init__ s c C sŐ t | } y | i d d \ } } Wn t j
o d SX| i d j o y | i i d } Wn t i j
o d SXy | i d d \ } } Wn t j
o d SXh | d 6| d 6} | Sd S( Nt i t basict base64t :t logint password( R t splitt
ValueErrort Nonet lowert stript decodet binasciit Error( R t environt
authorizationt authmetht authR R ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt identify s" c C s d S( N( ( R R t identity( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt remember) s c C s t i d | i } | S( Ns Basic realm="%s"( R t tuplesR ( R t head( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt _get_wwwauth. s c C s
| i S( N( R! ( R R R ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt forget3 s c C s8 | i } | d | j o | | } n t d | S( Ni t headers( R! R ( R R t statust app_headerst forget_headersR ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt challenge7 s c C s d | i i t | f S( Ns <%s %s>( t __class__t __name__t id( R ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt __repr__= s ( R) t
__module__R R R R R R R! R" R' R+ ( ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyR s
R c C s t | } | S( N( R ( R t plugin( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt make_pluginA s ( R t paste.httpheadersR R t paste.httpexceptionsR t zope.interfaceR t repoze.who.interfacesR R t objectR R. ( ( ( s@ /usr/lib/python2.6/site-packages/repoze/who/plugins/basicauth.pyt