summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-09feat: Implement DigiID callback verificationPawel Zelawski
- 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.
2025-04-09feat: Implement DigiID URI generation and define core typesPawel Zelawski
- Create initial source directory structure (src/). - Define core interfaces (DigiIDUriOptions, DigiIDCallbackData, etc.) and DigiIDError class in src/types.ts. - Set up main export file src/index.ts. - Implement the generateDigiIDUri function in src/digiid.ts for creating DigiID authentication URIs according to the specification. - Include helper function for generating secure nonces using Node crypto. - Add TSDoc comments for clarity and maintainability.
2025-04-09feat: Initialize project structure and dependenciesPawel Zelawski
Initialize the DigiID-TS project with basic tooling and configuration. - Create package.json with project metadata and scripts. - Configure TypeScript (tsconfig.json) for strict compilation. - Set up ESLint and Prettier for code linting and formatting. - Configure Vitest for unit testing and coverage. - Add a standard Node.js .gitignore file. - Install development dependencies (TypeScript, Vite, Vitest, ESLint, Prettier). - Install core runtime dependency 'digibyte-message' from the original library's Git source.
2025-04-09Initial commitPawel Zelawski