summaryrefslogtreecommitdiff
path: root/app/controllers/v1/certs_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-26 09:31:36 +0200
committerAzul <azul@leap.se>2014-05-26 09:31:36 +0200
commit00d5adc90ccadc7f4a2a0d54a5a31a1ad02f05be (patch)
tree2e9655ed7597c3a9d7c520d04f5991d62e7b345b /app/controllers/v1/certs_controller.rb
parent3a84578cf33685800c9216cfb4da12ea1fb0032f (diff)
change from GET to POST for certs
We create them. let's reflect that in the verb.
Diffstat (limited to 'app/controllers/v1/certs_controller.rb')
-rw-r--r--app/controllers/v1/certs_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/v1/certs_controller.rb b/app/controllers/v1/certs_controller.rb
index 73409ef..b6d1d0b 100644
--- a/app/controllers/v1/certs_controller.rb
+++ b/app/controllers/v1/certs_controller.rb
@@ -3,7 +3,15 @@ class V1::CertsController < ApplicationController
before_filter :require_login, :unless => :anonymous_certs_allowed?
# GET /cert
+ # deprecated - we actually create a new cert and that can
+ # be reflected in the action. GET /cert will eventually go
+ # away and be replaced by POST /cert
def show
+ create
+ end
+
+ # POST /cert
+ def create
@cert = ClientCertificate.new(:prefix => service_level.cert_prefix)
render text: @cert.to_s, content_type: 'text/plain'
end