From 6a79f929394e3bf1be12ea892593d13861b65573 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Fri, 21 Aug 2015 09:34:43 -0400 Subject: [PATCH] arv-tag authenticates to the API server with OAuth2. No issue #. --- sdk/cli/bin/arv-tag | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/cli/bin/arv-tag b/sdk/cli/bin/arv-tag index e400dab7da..5196d03bc2 100755 --- a/sdk/cli/bin/arv-tag +++ b/sdk/cli/bin/arv-tag @@ -17,11 +17,13 @@ def usage end def api_call(method, parameters:{}, request_body:{}) - request_body[:api_token] = ENV['ARVADOS_API_TOKEN'] result = $client.execute(:api_method => method, :parameters => parameters, :body_object => request_body, - :authenticated => false) + :authenticated => false, + :headers => { + authorization: "OAuth2 #{ENV['ARVADOS_API_TOKEN']}", + }) begin results = JSON.parse result.body -- 2.30.2