> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/tokens/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/tokens/webauthn.md).

# WebAuthn

## Introduction

Validates Web Authentication assertions.

## Configuration

{% hint style="info" %}
**Module name:** `WebAuthnValidation`
{% endhint %}

### Main configuration

The main part of the configuration.&#x20;

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="252">Name</th><th width="238">Description</th><th>Default</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td>namespace</td><td>Modules within the  same namespace belong together.</td><td></td><td>false</td></tr><tr><td>db_driver</td><td>Database driver, fully qualified class name</td><td></td><td>true</td></tr><tr><td>jdbc.url</td><td>JDBC url</td><td></td><td>true</td></tr><tr><td>jdbc.username</td><td>JDBC username</td><td></td><td>true</td></tr><tr><td>jdbc.password</td><td>JDBC password</td><td></td><td>true</td></tr><tr><td>secret_key_directory</td><td>Search path for secrets</td><td></td><td>false</td></tr><tr><td>encryption_key</td><td></td><td></td><td>false</td></tr><tr><td>origin</td><td></td><td></td><td>true</td></tr><tr><td>user_verification_required</td><td></td><td></td><td>true</td></tr><tr><td>user_presence_required</td><td></td><td></td><td>true</td></tr><tr><td>credential_request_options</td><td>Options for creating new passkeys, see below.</td><td></td><td>true</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "name": "WebAuthnValidation",
  "config": {
    "namespace": "default",
    "db_driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
    "jdbc": {
      "url": "jdbc:sqlserver://<host>:<port>;database=<database>;encrypt=false",
      "username": "<user>",
      "password": "<password>"
    },
    "encryption_key": "<encryption key>",
    "secret_key_directory": "resources/secrets",
    "origin": "https://example.com:443",
    "user_verification_required": true,
    "user_presence_required": true,
    "credential_request_options": {
      "rpId": "example.com",
      "timeout": 60000,
      "userVerification": "preferred"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Public Key Credential Request Options (credential\_request\_options)

This part of the configuration specifies options for the user agent. The configuration is sent from the server to the user agent when the agent begins a new authentication.

The table below describes the parameters involved, as specified by the W3C Recommendation from 8 April 2021 [Web Authentication: An API for accessing Public KeyCredentials Level 2](https://www.w3.org/TR/webauthn-2/).  The links refer to the W3C document.

A specification of how the user agent algorithm is determined by this configuration can be found [here](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion).

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="390">Name</th><th width="141">Description</th><th width="121">Default</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><a href="https://www.w3.org/TR/webauthn-2/#relying-party-identifier">rpId</a></td><td>Relying Party ID</td><td></td><td>false</td></tr><tr><td><a href="https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialcreationoptions-timeout">timeout</a></td><td>Recommended client side timeout</td><td><a href="https://www.w3.org/TR/webauthn-2/#sctn-createCredential">See step 4.</a></td><td>false</td></tr><tr><td><a href="https://www.w3.org/TR/webauthn-1/#userVerificationRequirement">userVerification</a></td><td></td><td>"preferred"</td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "name": "WebAuthnValidation",
  "config": {
    "namespace": "default",
    "db_driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
    "jdbc": {
      "url": "jdbc:sqlserver://<host>:<port>;database=<database>;encrypt=false",
      "username": "<user>",
      "password": "<password>"
    },
    "encryption_key": "<encryption key>",
    "origin": "https://example.com:443",
    "user_verification_required": true,
    "user_presence_required": true,
    "credential_request_options": {
      "rpId": "example.com",
      "timeout": 60000,
      "userVerification": "preferred"
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fortifiedid.se/tokens/webauthn.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
