diff options
author | Azul <azul@leap.se> | 2014-07-12 09:55:26 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-12 09:55:26 +0200 |
commit | 3bbfdf29bbc40432c21e34fe84060cf9ae70273f (patch) | |
tree | 553111ac07f6100738f29ddc7165fa800852f224 /app/designs/identity | |
parent | 0666c06fd7e66c783345a9810ace319a1cd9321f (diff) |
allow querying for the expiry of a particular fingerprint
Diffstat (limited to 'app/designs/identity')
-rw-r--r-- | app/designs/identity/cert_expiry_by_fingerprint.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/designs/identity/cert_expiry_by_fingerprint.js b/app/designs/identity/cert_expiry_by_fingerprint.js new file mode 100644 index 0000000..0636da5 --- /dev/null +++ b/app/designs/identity/cert_expiry_by_fingerprint.js @@ -0,0 +1,12 @@ +function(doc) { + if (doc.type != 'Identity') { + return; + } + if (typeof doc.cert_fingerprints === "object") { + for (fp in doc.cert_fingerprints) { + if (doc.cert_fingerprints.hasOwnProperty(fp)) { + emit(fp, doc.cert_fingerprints[fp]); + } + } + } +} |