151 lines
5.1 KiB
XML
151 lines
5.1 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="Authenticate subuser with password" id="subuserPasswordAuth">
|
||
|
||
<!-- 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 /subusers/auth/password</code-block>
|
||
</chapter>
|
||
<chapter title="Operation" id="operation">
|
||
<p>Operation ID: <code>subuserPasswordAuth</code></p>
|
||
<p>Authenticates a subuser (driver) using a password together with one of the supported
|
||
identifiers: `phone_country_code` + `phone`, `subuser_id`, or `username`.
|
||
|
||
On success, returns a newly generated session token for the subuser.
|
||
</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">
|
||
{
|
||
"oneOf": [
|
||
{
|
||
"properties": {
|
||
"password": {
|
||
"format": "password",
|
||
"maxLength": 255,
|
||
"minLength": 8,
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"description": "Phone number (4–15 digits, no leading +)",
|
||
"example": 12345678,
|
||
"maximum": 999999999999999,
|
||
"minimum": 1000,
|
||
"type": "integer"
|
||
},
|
||
"phone_country_code": {
|
||
"description": "Phone country code (1–3 digits)",
|
||
"example": 45,
|
||
"maximum": 999,
|
||
"minimum": 1,
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"required": [
|
||
"phone_country_code",
|
||
"phone",
|
||
"password"
|
||
],
|
||
"type": "object"
|
||
},
|
||
{
|
||
"properties": {
|
||
"password": {
|
||
"format": "password",
|
||
"maxLength": 255,
|
||
"minLength": 8,
|
||
"type": "string"
|
||
},
|
||
"subuser_id": {
|
||
"description": "Subuser ID",
|
||
"example": 42,
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"required": [
|
||
"subuser_id",
|
||
"password"
|
||
],
|
||
"type": "object"
|
||
},
|
||
{
|
||
"properties": {
|
||
"password": {
|
||
"format": "password",
|
||
"maxLength": 255,
|
||
"minLength": 8,
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"example": "jdoe",
|
||
"maxLength": 255,
|
||
"minLength": 3,
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"username",
|
||
"password"
|
||
],
|
||
"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>Authentication successful</td><td>application/json</td></tr>
|
||
<tr><td>400</td><td></td><td></td></tr>
|
||
<tr><td>404</td><td></td><td></td></tr>
|
||
<tr><td>500</td><td></td><td></td></tr>
|
||
</table>
|
||
<p>Schema for response <code>200</code> (<code>application/json</code>):</p>
|
||
<code-block lang="json">
|
||
{
|
||
"oneOf": [
|
||
{
|
||
"properties": {
|
||
"session": {
|
||
"description": "Newly generated subuser session token",
|
||
"example": "2f7a8c0e-9b1d-4c6a-91a9-1a2b3c4d5e6f",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"session"
|
||
],
|
||
"type": "object"
|
||
},
|
||
{
|
||
"properties": {
|
||
"2fa_required": {
|
||
"example": true,
|
||
"type": "boolean"
|
||
},
|
||
"2fa_token": {
|
||
"description": "Temporary 2FA verification token",
|
||
"example": "557a3e7b1a2b...",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"2fa_required",
|
||
"2fa_token"
|
||
],
|
||
"type": "object"
|
||
}
|
||
]
|
||
}
|
||
</code-block>
|
||
</chapter>
|
||
</topic>
|