stable

Clone or download

Read-only

feat: Begin registration ceremony

Part of story #31173 register a new passkey This commit introduce route POST /webauthn/registration to generate options for registration ceremony. These options are sent to the passkey. See WebAuthn documentation for more precision. *Testing :* Fetch POST /webauthn/registration : - If you are not connected, you will get an error 401 - If you are connected, you will see a json with this format : { rp: { name: "Tuleap", id: "<url>" }, user: { name: "<username>", id: "<encoded user id>", displayName: "<user realname>" }, challenge: "<string>", pubKeyCredParams : { type: "public-key", alg: int }[], attestation: "none" } Change-Id: I65b60cb2a944472e65e4d410e54968bc8219f7fb

Modified Files

Name
M src/common/Option/Option.php +12 −0 Go to diff View file
M src/common/Request/RouteCollector.php +26 −1 Go to diff View file
A src/common/WebAuthn/Controllers/PostRegistrationController.php +89 −0 Go to diff View file
A src/common/WebAuthn/WebAuthnRegistration.php +55 −0 Go to diff View file
M tests/psalm/psalm.xml +1 −0 Go to diff View file
M tests/unit/common/Option/OptionTest.php +7 −0 Go to diff View file
A tests/unit/common/WebAuthn/Controllers/PostRegistrationControllerTest.php +132 −0 Go to diff View file
A tests/unit/common/WebAuthn/WebAuthnCredentialSourceDaoStub.php +80 −0 Go to diff View file