summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Carranza <pcarranza@gmail.com>2016-03-04 12:27:21 +0000
committerPablo Carranza <pcarranza@gmail.com>2016-03-04 12:27:21 +0000
commit62ac6785fb873f49e6e5f67656d629886b5a6cb7 (patch)
tree5df42ad92b9dbe7d6de91c0bf43f841fcbc8d143
parentcbe8b70908cc0344bc0c05221e123be9addca500 (diff)
downloadgitlab-ce-support-ssh-key-api.tar.gz
Add support for ssh-key internal apisupport-ssh-key-api
-rw-r--r--lib/api/internal.rb9
-rw-r--r--spec/requests/api/internal_spec.rb8
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 2200208b946..cdcd0ccab5d 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -53,6 +53,15 @@ module API
end
#
+ # Get a ssh key by the fingerprint
+ #
+ # Not supported in CE
+ #
+ get "/ssh-key" do
+ status 501
+ end
+
+ #
# Discover user by ssh key
#
get "/discover" do
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index 22802dd0e05..496875cacb5 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -48,6 +48,14 @@ describe API::API, api: true do
end
end
+ describe "GET /internal/ssh-key" do
+ it "fails with not implemented" do
+ get(api("/internal/ssh-key"), secret_token: secret_token)
+
+ expect(response.status).to eq(501)
+ end
+ end
+
describe "POST /internal/allowed" do
context "access granted" do
before do