Yubico / yubikit-android

Yubico Mobile Android SDK - YubiKit
Apache License 2.0
114 stars 42 forks source link

[FIDO] Support extensions #161

Open AdamVe opened 1 week ago

AdamVe commented 1 week ago

Adds support for defined FIDO extensions (see CTAP2.1 and Webauthn specifications). This PR also adds simple framework for adding new extensions, by extending the Extension class and implementing relevant methods.

Extension processing happens during BasicWebauthnClient.makeCredential and BasicWebauthnClient.getAssertion calls, based on the creation and request options.

Results are exposed through PublicKeyCredential.getClientExtensionResults().

The following extensions are implemented:

A new BasicWebauthnClient constructor takes a list of Extension objects which it will process, by default the list contains defined extensions.

There are instrumented tests for each of the extensions (note that a supporting HW is needed for running the tests).