This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add display rule for signature renewal banner
- Loading branch information
Showing
3 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...certificate-backend-verifier-valuesets/src/main/resources/display-rules/renew-banner.aifc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
Check whether the cert signature is about to expire | ||
*/ | ||
|
||
import "../rule-constants/vaccine.aifc"; | ||
import "../rule-constants/test.aifc"; | ||
import "../rule-constants/recovery.aifc"; | ||
|
||
let cutoff = now() + 90#days; | ||
|
||
if (payload.h.exp) { | ||
if((payload.h.exp as DateTime) is before (cutoff as DateTime)){ | ||
"showRenewBanner" | ||
} else { | ||
undefined | ||
} | ||
} else { | ||
undefined | ||
} |
34 changes: 34 additions & 0 deletions
34
...kend-verifier-valuesets/src/main/resources/generated/display-rules/renew-banner.aifc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"if": [ | ||
{ | ||
"var": "payload.h.exp" | ||
}, | ||
{ | ||
"if": [ | ||
{ | ||
"before": [ | ||
{ | ||
"var": "payload.h.exp" | ||
}, | ||
{ | ||
"plusTime": [ | ||
{ | ||
"var": "external.validationClock" | ||
}, | ||
90, | ||
"day" | ||
] | ||
} | ||
] | ||
}, | ||
"showRenewBanner", | ||
{ | ||
"var": "undefined" | ||
} | ||
] | ||
}, | ||
{ | ||
"var": "undefined" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters