SDK overview

Prev Next

SDK component versions

The SDK contains the following components:

  • fido2-core-ext 5.0.1
  • fido2-sample-webapp 5.0.2

Product package contents

The structure of the product package ZIP file is as follows:

  • library: This directory contains the SDK files:

    • bin: This directory contains the binary files.

      • fido2-core-ext-5.0.1.jar: Contains the FIDO2 SDK implementation files without the required third-party dependencies.
      • fido2-core-ext-5.0.1.pom: Contains the list of third-party dependencies together with their associated versions, which are needed by the FIDO2 SDK implementation.
    • doc: Contains the ZIP file that holds the SDK Java code documentation.
    • db-schema.sql: Contains an example database schema that can be used to store FIDO-related data in a persistent relational database.
  • sample: This directory contains an example application that uses the OneSpan FIDO2 SDK. It exposes REST endpoints and a simple front end to demonstrate FIDO2 usage scenarios. The sample directory contains the following sub-directories:

    • bin: Contains the application WAR archive (fido2-sample-webapp-5.0.2.war), which can be deployed to the application server (such as Apache Tomcat, IBM WebSphere).
    • src: Contains the sample web application source code.

Adding the OneSpan FIDO2 SDK to your project

The fido2-core-ext-5.0.1.jar is a thin Java archive file (JAR) that contains the FIDO2 SDK implementation. It does not contain the required third-party dependencies. The SDK includes a Project Object Model (POM) file that declares all the required third-party dependencies and their associated versions.

The POM file can be found in the binary folder of the extracted package, i.e., sdk\fido2\library\bin\fido2-core-ext-5.0.1.pom.

To integrate the SDK library into your project

  1. Create the following repository folder structure in your project root folder:

    project_folder\repository\com\onespan\fido\fido2\fido2-core-ext\5.0.1

    Replace project_folder with the top folder of your project.

  2. Copy fido2-core-ext-5.0.1.jar and fido2-core-ext-5.0.1.pom to the new repository folder.
  3. Adapt your build.gradle file to enable the import from the new repository folder:

    repositories {
      maven {
        url "${projectDir}/repository"
      }
      mavenCentral()
    }
  4. To import the OneSpan FIDO2 SDK implementation, update the dependency section:

    dependencies {
      implementation 'com.onespan.fido.fido2:fido2-core-ext:5.0.1'
    }