diff options
author | Azul <azul@leap.se> | 2014-07-07 10:05:37 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-12 09:14:23 +0200 |
commit | 0e9c41a286b49b5ce52abcf0e014668d0167bbae (patch) | |
tree | 228ceba1ee81ece31c8a514121217145f7fa6af8 /app/models/identity.rb | |
parent | 1c7308207a9ab46cfb60c72aceaee2b3c82281fe (diff) |
store expiry with cert fingerprints
We used to store the creation date but this way it's easier to query for non expired certs
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r-- | app/models/identity.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb index eb67b1b..1d69437 100644 --- a/app/models/identity.rb +++ b/app/models/identity.rb @@ -146,9 +146,9 @@ class Identity < CouchRest::Model::Base end def register_cert(cert) - today = DateTime.now.to_date.to_s + expiry = cert.expiry.to_data.to_s write_attribute 'cert_fingerprints', - cert_fingerprints.merge(cert.fingerprint => today) + cert_fingerprints.merge(cert.fingerprint => expiry) end # for LoginFormatValidation |