#NEWLINE# def authenticate( self , environ ) : #NEWLINE# #INDENT# authorization = AUTHORIZATION ( environ ) #NEWLINE# if ( not authorization ) : #NEWLINE# #INDENT# return self . build_authentication ( ) #NEWLINE# #UNINDENT# ( authmeth , auth ) = authorization . split ( ' ' , 1 ) #NEWLINE# if ( 'basic' != authmeth . lower ( ) ) : #NEWLINE# #INDENT# return self . build_authentication ( ) #NEWLINE# #UNINDENT# auth = auth . strip ( ) . decode ( 'base64' ) #NEWLINE# ( username , password ) = auth . split ( ':' , 1 ) #NEWLINE# if self . authfunc ( environ , username , password ) : #NEWLINE# #INDENT# return username #NEWLINE# #UNINDENT# return self . build_authentication ( )