summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-08-21 17:32:44 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-08-22 09:20:51 -0700
commitca6884608b43fa97dae5ecd1db8860758b3373cd (patch)
treed1a17874630662d0dd8ab0cb96793b4a0c075ccc
parent25c8afd9561fcee0c3f1bd0e2a5fb2dd79cb8f5d (diff)
downloadchef-zero-ca6884608b43fa97dae5ecd1db8860758b3373cd.tar.gz
Remove /verify_password
-rw-r--r--lib/chef_zero/endpoints/verify_password_endpoint.rb22
-rw-r--r--lib/chef_zero/server.rb2
2 files changed, 0 insertions, 24 deletions
diff --git a/lib/chef_zero/endpoints/verify_password_endpoint.rb b/lib/chef_zero/endpoints/verify_password_endpoint.rb
deleted file mode 100644
index 107870a..0000000
--- a/lib/chef_zero/endpoints/verify_password_endpoint.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'json'
-require 'chef_zero/rest_base'
-
-module ChefZero
- module Endpoints
- # /verify_password
- class VerifyPasswordEndpoint < RestBase
- def post(request)
- request_json = JSON.parse(request.body, :create_additions => false)
- name = request_json['user_id_to_verify']
- password = request_json['password']
- user = get_data(request, request.rest_path[0..-2] + ['users', name], :nil)
- if !user
- raise RestErrorResponse.new(403, "Nonexistent user")
- end
-
- user = JSON.parse(user, :create_additions => false)
- json_response(200, { 'password_is_correct' => user['password'] == password })
- end
- end
- end
-end
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index 73e0561..1f1e29e 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -78,7 +78,6 @@ require 'chef_zero/endpoints/user_association_requests_endpoint'
require 'chef_zero/endpoints/user_association_requests_count_endpoint'
require 'chef_zero/endpoints/user_association_request_endpoint'
require 'chef_zero/endpoints/user_organizations_endpoint'
-require 'chef_zero/endpoints/verify_password_endpoint'
require 'chef_zero/endpoints/file_store_file_endpoint'
require 'chef_zero/endpoints/not_found_endpoint'
@@ -433,7 +432,6 @@ module ChefZero
[ "/users/*/organizations", UserOrganizationsEndpoint.new(self) ],
[ "/authenticate_user", AuthenticateUserEndpoint.new(self) ],
[ "/system_recovery", SystemRecoveryEndpoint.new(self) ],
- [ "/verify_password", VerifyPasswordEndpoint.new(self) ],
[ "/organizations", OrganizationsEndpoint.new(self) ],
[ "/organizations/*", OrganizationEndpoint.new(self) ],