summaryrefslogtreecommitdiff
path: root/vitest.config.ts
diff options
context:
space:
mode:
authorPawel Zelawski <pawel.zelawski@outlook.com>2025-04-09 19:24:26 +0200
committerPawel Zelawski <pawel.zelawski@outlook.com>2025-04-09 19:24:26 +0200
commit81931d914b0edd6be21e4c03d33f64d71af99267 (patch)
treee413b24aa17224aa08b4f6066a7811dc370cf400 /vitest.config.ts
parent8092ceaf10dd5951d0b5011fc8d5a05b49335a6e (diff)
feat: Implement DigiID callback verification
- Add the `verifyDigiIDCallback` async function to `src/digiid.ts`. - Parses the received DigiID URI to extract nonce, callback details, and unsecure flag. - Validates the callback URL path and scheme against expected values. - Optionally validates the received nonce against the expected nonce. - Utilizes the 'digibyte-message' library (via require) to perform cryptographic signature verification of the URI against the provided address. - Throws specific `DigiIDError` exceptions for various validation and verification failures (e.g., invalid URI, URL mismatch, nonce mismatch, invalid signature). - Returns a `DigiIDVerificationResult` upon successful verification. - Imports necessary types and the CommonJS `digibyte-message` dependency.
Diffstat (limited to 'vitest.config.ts')
0 files changed, 0 insertions, 0 deletions