#NEWLINE# def requestAvatarId( self , credentials ) : #NEWLINE# #INDENT# if ( credentials . username in self . users ) : #NEWLINE# #INDENT# return defer . maybeDeferred ( credentials . checkPassword , self . users [ credentials . username ] ) . addCallback ( credentials . _cbPasswordMatch , str ( credentials . username ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return defer . fail ( error . UnauthorizedLogin ( ) )