ForkbombEu / DIDroom_microservices

DIDroom credential issuer part of Forkbomb's SSI solution
1 stars 0 forks source link

Handle better the expiry #138

Closed matteo-cristino closed 1 month ago

matteo-cristino commented 4 months ago

The expiry should be read from

custom_code/${credential_name}.date.json

from https://github.com/ForkbombEu/DIDroom_microservices/blob/main/credential_issuer/credential_4_sd_jwt.zencode. Example of expiry are:

{
  "duration": {
    "days": 0,
    "months": 6,
    "years": 0
  },
  "mode": "duration"
}

and

{
  "date": 1721477901,
  "mode": "date"
}

A new statement to @slangroom/timestamp shold be added to handle the first example

matteo-cristino commented 2 months ago

First snippets to have this done:

Rule unknown ignore

Given I send path 'path_to_time_file' and read file content and output into 'object'
Given I send object 'object' and send path 'path' and manipulate and get and output into 'mode'
Given I send object 'object' and send paths 'path' and manipulate and omit and output into 'temp'

Given I have a 'string' named 'mode'
Given I have a 'time dictionary' named 'temp'

# ... add all time calculation for expiry