#NEWLINE# def _auth( self ) : #NEWLINE# #INDENT# '\n        Perform an authorization request against Riak\n        returns True upon success, False otherwise\n        Note: Riak will sleep for a short period of time upon a failed\n              auth request/response to prevent denial of service attacks\n        ' #NEWLINE# codec = PbufCodec ( ) #NEWLINE# username = self . _client . _credentials . username #NEWLINE# password = self . _client . _credentials . password #NEWLINE# if ( not password ) : #NEWLINE# #INDENT# password = '' #NEWLINE# #UNINDENT# msg = codec . encode_auth ( username , password ) #NEWLINE# ( resp_code , _ ) = self . _non_connect_send_recv_msg ( username ) #NEWLINE# if ( resp_code == riak . pb . messages . MSG_CODE_AUTH_RESP ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False