Skip to content

Fortified IDDocs

Passkey validator

Configuration and usage guidance for Passkey validator in Fortified ID Access.

Other components that this module uses or need:

  • Web -> WebAuthnValidation
    To authenticate users using a Passkey you need to have a database connection. ref:tokens/
  • Enrollment -> Check out the Enrollment documentation.
    To be able to authenticate you must have enrolled for a token.

Common Authenticator configuration can be found here.

NameDescriptionDefault valueMandatory
username_parameterName of the property to where the username is exportedusernamefalse
namespaceNamespace used to communicate with other modulesdefaultfalse
webroot_dirSee common authenticator configurationweb/authenticator/webauthnfalse
auto_startIf true, the authentication will start automatically when the user is presented with the UI (no click required)
If false, the user is presented with a button to start the authentication
truefalse
  • WEB_100022("Passkey validated")

    • IDENTIFIER (user trace id)
    • CUSTOMER_IDENTIFIER (if configured)
    • SOURCE_ADDRESS (ip of the remote session)
  • WEB_100023("Passkey validation failed")

    • IDENTIFIER (user trace id)
    • CUSTOMER_IDENTIFIER (if configured)
    • SOURCE_ADDRESS (ip of the remote session)

After successful authentiation, the authenticator populates the configured username property with the user identifier obtained during the Web Authentication process.

API follows the general conventions of the Fortified Web Authenticator API. The messages below carry the structures defined in Web Authentication: An API for accessing Public Key Credentials Level 2, W3C Recommendation, 8 April 2021.

All requests use the HTTP PUT method with Content-Type: application/json, sent to the directory URL the view was loaded from. The session cookie must be sent with every request, and the browser must support the Web Authentication API.

MessagePurpose
initFetch view settings. Send it when the view loads.
optionsBegin an authentication and obtain the credential request options.
verificationReturn the assertion produced by the browser.
stateFetch the current state. This authenticator keeps no intermediate state and always answers NONE.
cancelCancel the authentication.

Send this when the view loads. The response tells the view whether to invoke the browser dialogue immediately or wait for the user to act.

{
"type": "init"
}

auto_start mirrors the configuration property of the same name.

Request the credential request options. The server generates a challenge, stores it for the session, and answers with a PublicKeyCredentialRequestOptions as the whole response body.

{
"type": "options"
}

Pass the options to the browser to obtain an AuthenticatorAssertionResponse, then return the assertion. All binary members are base64url encoded.

{
"type": "verification",
"data": {
"assertion": {
"id": "<credential-id>",
"response": {
"userHandle": "<base64url>",
"authenticatorData": "<base64url>",
"clientDataJSON": "<base64url>",
"signature": "<base64url>"
}
}
}
}

This authenticator holds no intermediate state between options and verification, so the response is always the same. A view that is reloaded must start over with options.

{
"type": "state"
}

A request can be canceled at any time. This is done by sending a cancel request.

{
"type": "cancel"
}

Expect HTTP status code 200. Anything else is to be considered an error.

The body is a JSON object. The options response is the credential request options object itself; the other messages answer with a status property or with a complete, cancel, or failure message as described in Web Authenticator API.

StatusMeaning
NONENo authentication is in progress. Only returned by state.
AUTHORIZEDThe assertion was verified and the user is authenticated.
UNAUTHORIZEDThe assertion could not be verified.
{
"webauthn.start_validate": "Login",
"webauthn.verifying": "Verifying passkey",
"webauthn.verified": "Passkey verified",
"webauthn.redirecting": "Redirecting...",
"webauthn.validation_error.authenticator_failure": "Passkey authentication failed",
"webauthn.validation_error.verification_failure": "Passkey verification failed",
"webauthn.validation_error.unknown_error": "Unknown error",
"webauthn.reset_button": "Go back",
"allow-cookies-body": "To save your language settings on this device you need to approve a language cookie.",
"allow-cookies-button": "Approve language cookie",
"authentication.help_text": "",
"change_language": "Change language"
}
{
"webauthn.start_validate": "Logga in",
"webauthn.verifying": "Säkerhetsnyckel verifieras...",
"webauthn.verified": "Säkerhetsnyckel verifierad",
"webauthn.redirecting": "Omdirigerar...",
"webauthn.validation_error.authenticator_failure": "Autenticering med säkerhetsnyckel misslyckades",
"webauthn.validation_error.verification_failure": "Verifiering av säkerhetsnyckel misslyckades",
"webauthn.validation_error.unknown_error": "Okänt fel inträffade",
"webauthn.reset_button": "Gå tillbaka",
"allow-cookies-body": "Vill du spara dina språkinställningar på denna enhet behövs ett godkännande av språk-cookie.",
"allow-cookies-button": "Godkänn språk-cookie",
"authentication.help_text": "",
"change_language": "Byt språk"
}