Pretty stable but the API may still change slightly until the 1.0 release.
This library aims to implement the relying party server of the WebAuthn specification in PHP. Important goals are:
Installation via composer:
composer require madwizard/webauthn
PHP 7.2
The library is still in development so documentation is limited. The general pattern to follow is:
CredentialStoreInterface
(you will need UserCredential
or your own implementation of UserCredentialInterface
)RelyingParty
and use the ServerBuilder
class to build a server object:
$server = (new ServerBuilder())
->setRelyingParty($rp)
->setCredentialStore($store)
->build();
startRegistration
/finishRegistration
to register credentials. Be sure to store the temporary AttestationContext
server side!startAuthentication
/finishAuthentication
to authenticate. Be sure to store the temporary AssertionContext
server side!