summaryrefslogtreecommitdiff
path: root/app/controllers/v1
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-15 16:29:49 +0200
committerAzul <azul@leap.se>2014-05-19 14:24:47 +0200
commit17b67aeda81dee2273ce1161ac7292a328c3efaa (patch)
tree8c7da1f418c61c8159cb761c6c2a081d521031fd /app/controllers/v1
parent71dcf3f4e5d423b78b47f675297fc98b28ef3442 (diff)
store cert fingerprint with main user identity
Diffstat (limited to 'app/controllers/v1')
-rw-r--r--app/controllers/v1/smtp_certs_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/v1/smtp_certs_controller.rb b/app/controllers/v1/smtp_certs_controller.rb
index 001425d..258b391 100644
--- a/app/controllers/v1/smtp_certs_controller.rb
+++ b/app/controllers/v1/smtp_certs_controller.rb
@@ -6,6 +6,8 @@ class V1::SmtpCertsController < ApplicationController
# GET /cert
def show
@cert = ClientCertificate.new prefix: current_user.email_address
+ current_user.identity.cert_fingerprints << @cert.fingerprint
+ current_user.identity.save
render text: @cert.to_s, content_type: 'text/plain'
end