Extension handling

Prev Next

The OneSpan FIDO2 SDK supports a set of WebAuthn extensions - Table: Supported WebAuthn extensions lists these extensions.

  Table:  Supported WebAuthn extensions
ExtensionProcessLink
AppIdAuthenticationhttps://www.w3.org/TR/webauthn/#sctn-appid-extension
Simple Transaction AuthorizationAuthenticationhttps://www.w3.org/TR/webauthn/#sctn-simple-txauth-extension
Generic Transaction AuthorizationAuthenticationhttps://www.w3.org/TR/webauthn/#sctn-generic-txauth-extension
Authenticator SelectionRegistrationhttps://www.w3.org/TR/webauthn/#sctn-authenticator-selection-extension
Supported ExtensionsRegistrationhttps://www.w3.org/TR/webauthn/#sctn-supported-extensions-extension
User Verification IndexRegistration, authenticationhttps://www.w3.org/TR/webauthn/#sctn-uvi-extension
LocationRegistration, authenticationhttps://www.w3.org/TR/webauthn/#sctn-location-extension
User Verification MethodRegistration, authenticationhttps://www.w3.org/TR/webauthn/#sctn-uvm-extension
Biometric Authenticator Performance BoundsRegistrationhttps://www.w3.org/TR/webauthn/#sctn-authenticator-biometric-criteria-extension

The requested extensions are added to PublicKeyCredentialCreationOptions (for the registration process) or to PublicKeyCredentialRequestOptions (for the authentication process).

The requested extensions should be saved in a session storage and passed to the second step of the SDK processes to verify that the requested extensions were processed by an existing client.

For the supported extensions you can override the validation logic: Overriding the validation logic of supported extensions outlines the necessary steps.

Overriding the validation logic of supported extensions

  1. Implement the ExtensionHandler interface.
  2. Add the handler to the ExtensionHandlerRegistry instance that is used to configure the extension handling for the SDK.
  3. Use the corresponding instance of ExtensionHandlerRegistry to configure either RegistrationExtensionVerifier or AuthenticationExtensionVerifier.