-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIDO] Support extensions #161
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpotBugs found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
@@ -364,6 +418,24 @@ public CredentialManager getCredentialManager(char[] pin) | |||
} | |||
} | |||
|
|||
protected static class WithExtensionResults<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just re-use Pair for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, will update 👍🏻
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
andBasicWebauthnClient.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).