PHP webcoder31/ezxmldsig
PHP 7.4 or later, with the OpenSSL extension.
composer require webcoder31/ezxmldsig
XML Signature · XML Encryption · PHP · Node.js
ezxmldsig creates and verifies XML tokens: user data, timestamped, signed with the key of their sender and, if need be, encrypted for their receiver. A receiver accepts a token only if its certificate descends from the certification authorities it trusts. Use them for single sign-on, or to pass any data whose origin must be proven. Why?
PHP 7.4 or later, with the OpenSSL extension.
composer require webcoder31/ezxmldsig
Node.js 22.12 or later.
npm install @webcoder31/ezxmldsig
Each library reads the tokens of the other, signed or encrypted, and refuses the same forged tokens with the same errors: a single sign-on can mix applications written in PHP and in Node.js. The tokens follow the W3C standards XML Signature and XML Encryption.
The Node.js library also seals files, from its version 2.0.0, as an experimental feature: detached XAdES signatures in an ASiC-E container, which validators of electronic signatures such as DSS, the validator of the European Commission, accept. The PHP library seals files too, from its version 2.1.0, as an experimental feature: each library verifies the seals of the other.
Create a token, read each block of its signature, follow the checks of the receiver one by one, and replay the attacks the library refuses.
Three sites on three host names: an identity provider, which alone knows the passwords, and two applications that open on its signed tokens, one login for both.