#NEWLINE# def authenticate( self , username , password = SessionUserMiddleware . NOT_NEEDED , from_session = False ) : #NEWLINE# #INDENT# if ( ( not from_session ) and username and ( password != SessionUserMiddleware . NOT_NEEDED ) ) : #NEWLINE# #INDENT# if ( not self . check_password ( username , password ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# return SessionUserMiddleware . authenticate ( username , SessionUserMiddleware . NOT_NEEDED )