summaryrefslogtreecommitdiff
path: root/lib/mixlib/authentication/http_authentication_request.rb
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-11-18 13:30:09 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-11-18 13:30:09 -0800
commitd2090abb2d59350b818de76c88b86f089f9b1096 (patch)
treed7f7bf672276265ae1abb6d86c2964eae6d567a7 /lib/mixlib/authentication/http_authentication_request.rb
parent4671ef29108ff167a1c9bee6882ccc2eea5e4773 (diff)
downloadmixlib-authentication-jdm/sign-v1.3-x-ops-server-api-version.tar.gz
Sign x-ops-server-api-version headerjdm/sign-v1.3-x-ops-server-api-version
Diffstat (limited to 'lib/mixlib/authentication/http_authentication_request.rb')
-rw-r--r--lib/mixlib/authentication/http_authentication_request.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mixlib/authentication/http_authentication_request.rb b/lib/mixlib/authentication/http_authentication_request.rb
index cc6b566..efa8d80 100644
--- a/lib/mixlib/authentication/http_authentication_request.rb
+++ b/lib/mixlib/authentication/http_authentication_request.rb
@@ -64,6 +64,10 @@ module Mixlib
headers[:x_ops_content_hash].chomp
end
+ def server_api_version
+ (headers[:x_ops_server_api_version] || '0').chomp
+ end
+
def request_signature
unless @request_signature
@request_signature = headers.find_all { |h| h[0].to_s =~ /^x_ops_authorization_/ }.sort { |x,y| x.to_s <=> y.to_s}.map { |i| i[1] }.join("\n")
@@ -80,8 +84,6 @@ module Mixlib
raise MissingAuthenticationHeader, "missing required authentication header(s) '#{missing_headers.join("', '")}'"
end
end
-
-
end
end
end