Trustedtimestamp service implements the generate and verification of timestamps.
$ yarn add @techteamer/timestamp
const { TrustedTimestampService: TrustedTimestampServiceLib } = require('@techteamer/timestamp')
...
this.trustedTimestampService = new TrustedTimestampServiceLib('normal', config.get('trustedTimestamp'), config.get('certService.encoding', 'latin1'))
- TimestampInfo output type format: normal, short
- config: prodiders and cert location, config.get('trustedTimestamp')
- encode type(optional): config.get('certService.encoding', 'latin1')
"trustedTimestamp": {
"certsLocation": "/etc/ssl/certs/",
"providers": [
{
"name": "bteszt",
"url": "https://bteszt.e-szigno.hu/tsa",
"auth": {
"user": "<username>",
"pass": "<password>"
}
}
]
}
- name (string)
- url (string | object): Simple url string or object {getTokenUrl: string, getTimestampUrl: string}
- auth (object): Username and password for auth (object): {user: string, pass: string}
- priority (number) - The order of the service providers can be changed, the higher number is the first
- body (object) - The infocert type provider can set body parameter
"trustedTimestamp": {
{
"certsLocation": "/etc/ssl/certs/",
"providers": [
{
"name": "bteszt",
"url": "https://bteszt.e-szigno.hu/tsa",
"auth": {
"user": "<username>",
"pass": "<password>"
}
},
{
"name": "infocert 1 test",
"priority": 999,
"url": {
"getTokenUrl": "https://idpstage.infocert.digital/auth/realms/delivery/protocol/openid-connect/token",
"getTimestampUrl": "https://apistage.infocert.digital/timestamp/v1/apply"
},
"auth": {
"user": "<username>",
"pass": "<password>"
},
"body": {
"grant_type": "client_credentials",
"scope": "timestamp"
}
}
]
}
}
getTimestampInfo
createTimestampToken
verifyToken
verifyTsr
testService