summaryrefslogtreecommitdiff
path: root/lib/chef/user.rb
diff options
context:
space:
mode:
authortylercloke <tylercloke@gmail.com>2015-06-02 11:15:32 -0700
committertylercloke <tylercloke@gmail.com>2015-06-05 10:38:49 -0700
commita929c389252d5da4c3ddc2f0cce10e43e6dc19ab (patch)
treef91aa4d30ddf13c040d507e5baa68dc5c9f751c2 /lib/chef/user.rb
parentfb73d4ae3a0c20a3c0dfa5a85b652b8f0cba5a32 (diff)
downloadchef-a929c389252d5da4c3ddc2f0cce10e43e6dc19ab.tar.gz
Reregister V0 support for Chef::Client.
Diffstat (limited to 'lib/chef/user.rb')
-rw-r--r--lib/chef/user.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/chef/user.rb b/lib/chef/user.rb
index 6758ed671d..0ec7e87ed3 100644
--- a/lib/chef/user.rb
+++ b/lib/chef/user.rb
@@ -225,19 +225,10 @@ class Chef
end
end
- def reregister_only_v0_supported_error_msg(max_version, min_version)
-<<-EOH
-The reregister command only supports server API version 0.
-The server that received the request supports a min version of #{min_version} and a max version of #{max_version}.
-User keys are now managed via the key rotation commmands.
-Please refer to the documentation on how to manage your keys via the key rotation commands.
-EOH
- end
-
# Note: remove after API v0 no longer supported by client (and knife command).
def reregister
begin
- payload = self.to_hash.merge({:private_key => true})
+ payload = self.to_hash.merge({"private_key" => true})
reregistered_self = chef_root_rest_v0.put("users/#{username}", payload)
private_key(reregistered_self["private_key"])
# only V0 supported for reregister