[ARVADOS] created: 7ff85869345089297f5196c4be3cee6f7ee03c6b
git at public.curoverse.com
git at public.curoverse.com
Mon May 12 15:01:53 EDT 2014
at 7ff85869345089297f5196c4be3cee6f7ee03c6b (commit)
commit 7ff85869345089297f5196c4be3cee6f7ee03c6b
Author: Tom Clegg <tom at curoverse.com>
Date: Mon May 12 15:01:37 2014 -0400
2673: Move auth to headers, avoid combining request body with GET method.
diff --git a/sdk/cli/bin/arv b/sdk/cli/bin/arv
index f453675..d047204 100755
--- a/sdk/cli/bin/arv
+++ b/sdk/cli/bin/arv
@@ -301,14 +301,14 @@ if global_opts[:dry_run]
exit
end
-request_parameters = {}.merge(method_opts)
+request_parameters = {_profile:true}.merge(method_opts)
resource_body = request_parameters.delete(resource_schema.to_sym)
if resource_body
request_body = {
resource_schema => resource_body
}
else
- request_body = {}
+ request_body = nil
end
case api_method
@@ -335,12 +335,13 @@ when
end
exit 0
else
- request_body[:api_token] = ENV['ARVADOS_API_TOKEN']
- request_body[:_profile] = true
result = client.execute(:api_method => eval(api_method),
:parameters => request_parameters,
:body => request_body,
- :authenticated => false)
+ :authenticated => false,
+ :headers => {
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
+ })
end
begin
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list