#NEWLINE# def _getAuthorization( self , method , parameters ) : #NEWLINE# #INDENT# '\n        Create authentication parameters.\n\n        **Arguments:**\n         * *method* -- HTTP method of the request\n         * *parameters* -- Key value pairs of parameters\n\n        **Returns:**\n         * A dictionary of authorization parameters\n        ' #NEWLINE# signature_parameters = { #NEWLINE# #INDENT# 'AWSAccessKeyId' : self . aws_access_key_id , #NEWLINE# 'Timestamp' : ( datetime . utcnow ( ) . isoformat ( ) [ 0 : 19 ] + '+00:00' ) , #NEWLINE# 'AWSAccessKeyId' : self . aws_access_key_id , #NEWLINE# 'Version' : '2009-10-01' , #NEWLINE# #UNINDENT# } #NEWLINE# signature_parameters . update ( parameters ) #NEWLINE# query_string = self . _canonicalize ( signature_parameters ) #NEWLINE# string_to_sign = ( '%(method)s\n%(host)s\n%(resource)s\n%(qs)s' % { #NEWLINE# #INDENT# 'method' : method , #NEWLINE# 'host' : self . host . lower ( ) , #NEWLINE# 'resource' : '/onca/xml' , #NEWLINE# 'qs' : query_string , #NEWLINE# #UNINDENT# } ) #NEWLINE# args = [ self . aws_secret_access_key , args , hashlib . sha256 ] #NEWLINE# signature = base64 . encodestring ( hmac . new ( * args ) . digest ( ) ) . strip ( ) #NEWLINE# signature_parameters . update ( { #NEWLINE# #INDENT# 'Signature' : signature , #NEWLINE# #UNINDENT# } ) #NEWLINE# return signature_parameters