109 lines
4.2 KiB
XML
109 lines
4.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE topic
|
|
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
|
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
|
title="Initiate passkey authentication challenge" id="passkeyChallenge">
|
|
|
|
<!-- AUTO-GENERATED, DO NOT EDIT -->
|
|
<p>This endpoint documentation is generated directly from <code>openapi.yaml</code>.</p>
|
|
<chapter title="Endpoint" id="endpoint">
|
|
<code-block lang="http">POST /auth/passkey/challenge</code-block>
|
|
</chapter>
|
|
<chapter title="Operation" id="operation">
|
|
<p>Operation ID: <code>passkeyChallenge</code></p>
|
|
<p>Generates a WebAuthn PublicKeyCredentialRequestOptions payload. If customer_number is provided, allowCredentials will be populated with existing passkeys for that account. Otherwise, a challenge is issued for discoverable credentials.</p>
|
|
</chapter>
|
|
<chapter title="Authentication" id="authentication"><p>No authentication required.</p></chapter>
|
|
<chapter title="Request Body" id="request-body">
|
|
<p>Required: yes.</p>
|
|
<p>Content type: <code>application/json</code></p>
|
|
<code-block lang="json">
|
|
{
|
|
"properties": {
|
|
"customer_number": {
|
|
"description": "Optional customer's e-conomic customer number",
|
|
"example": 12345,
|
|
"type": "integer"
|
|
},
|
|
"g_recaptcha_response": {
|
|
"description": "reCAPTCHA verification token",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"g_recaptcha_response"
|
|
],
|
|
"type": "object"
|
|
}
|
|
</code-block>
|
|
</chapter>
|
|
<chapter title="Responses" id="responses">
|
|
<table>
|
|
<tr><td>Status</td><td>Description</td><td>Content Types</td></tr>
|
|
<tr><td>200</td><td>Challenge generated</td><td>application/json</td></tr>
|
|
<tr><td>400</td><td></td><td></td></tr>
|
|
</table>
|
|
<p>Schema for response <code>200</code> (<code>application/json</code>):</p>
|
|
<code-block lang="json">
|
|
{
|
|
"properties": {
|
|
"challenge_token": {
|
|
"description": "Temporary token binding the challenge to the login attempt",
|
|
"type": "string"
|
|
},
|
|
"publicKey": {
|
|
"properties": {
|
|
"allowCredentials": {
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Base64URL-encoded credential ID",
|
|
"type": "string"
|
|
},
|
|
"transports": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"example": "public-key",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"challenge": {
|
|
"description": "Base64URL-encoded challenge",
|
|
"type": "string"
|
|
},
|
|
"rpId": {
|
|
"description": "Relying party ID (truckwash.io or localhost)",
|
|
"example": "truckwash.io",
|
|
"type": "string"
|
|
},
|
|
"timeout": {
|
|
"description": "Timeout in milliseconds",
|
|
"type": "integer"
|
|
},
|
|
"userVerification": {
|
|
"enum": [
|
|
"required",
|
|
"preferred",
|
|
"discouraged"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
</code-block>
|
|
</chapter>
|
|
</topic>
|