lib/oci/base_signer.rb
# Generates the correct signature and adds it to the
# headers that are passed in. Also injects any required
# headers that might be missing.
#
# @param [Symbol] method The HTTP method, such as :get or :post.
# @param [String] uri The URI, such as 'https://iaas.us-phoenix-1.oraclecloud.com/20160918/volumeAttachments/'
# @param [Hash] headers A hash of headers
# @param [String] body The request body
# @param [String] operation_signing_strategy the signing strategy for the operation. Default is :standard
Generates the correct signature and adds it to the
headers that are passed in. Also injects any required
headers that might be missing.
Generates the correct signature and adds it to the headers that are passed in . Also injects any required headers that might be missing .
def sign(method, uri, headers, body, operation_signing_strategy = :standard)
      method = method.to_sym.downcase
      uri = URI(uri)
      path = uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}"
      inject_missing_headers(method, headers, body, uri, operation_signing_strategy)
      signature = compute_signature(headers, method, path, operation_signing_strategy)
      inject_authorization_header(headers, method, signature, operation_signing_strategy) unless signature.nil?
    end
def sign ( method , uri , headers , body , operation_signing_strategy = :standard ) method = method . to_sym . downcase uri = URI ( uri ) path = uri . query . nil? ? uri . path : "#{uri.path}?#{uri.query}" inject_missing_headers ( method , headers , body , uri , operation_signing_strategy ) signature = compute_signature ( headers , method , path , operation_signing_strategy ) inject_authorization_header ( headers , method , signature , operation_signing_strategy ) unless signature . nil? end
Generates the correct signature and adds it to the
headers that are passed in.
Generates the correct signature and adds it to the headers that are passed in .
method
uri
headers
body
operation_signing_strategy
operation_signing_strategy the signing strategy for the operation. Default is :standard
operation_signing_strategy the signing strategy for the operation . Default is : standard