-
Notifications
You must be signed in to change notification settings - Fork 0
/
InsuranceConfig.json
36 lines (36 loc) · 1.15 KB
/
InsuranceConfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
##Here we are injecting DateTool instance from java velocity library to set the expiry date
#set( $defaultLocale = $date.getLocale() )
#set( $calenderNow = $date.getCalendar() )
#set( $ISO8601DateTimeWithMillisUTC = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" )
## Adding no. of Days we want to set as expiry,here '5' represent Day and '30' represent no. of days
#set( $expiry =$calenderNow.add(5,30))
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://holashchand.github.io/test_project/insurance-context.json",
{
"LifeInsuranceCredential": {
"@id":"InsuranceCredential"
}
}
],
"type": [
"VerifiableCredential",
"LifeInsuranceCredential",
"InsuranceCredential"
],
"issuer": "${issuerId}",
"expirationDate": "${date.format($ISO8601DateTimeWithMillisUTC, $calenderNow, $defaultLocale)}",
"credentialSubject": {
"dob": "${dob}",
"gender": "${gender}",
"mobile": "${mobile}",
"benefits": #if($benefits)$benefits#else#set($benefits = '"[]"') $benefits#end,
"fullName": "${fullName}",
"email": "${email}",
"policyIssuedOn": "${policyIssuedOn}",
"policyExpiresOn": "${policyExpiresOn}",
"policyName": "${policyName}",
"policyNumber": "${policyNumber}"
}
}