Files
api/documentation/topics/generated/subuserPasswordAuth.topic
T

151 lines
5.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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">
{
&quot;oneOf&quot;: [
{
&quot;properties&quot;: {
&quot;password&quot;: {
&quot;format&quot;: &quot;password&quot;,
&quot;maxLength&quot;: 255,
&quot;minLength&quot;: 8,
&quot;type&quot;: &quot;string&quot;
},
&quot;phone&quot;: {
&quot;description&quot;: &quot;Phone number (415 digits, no leading +)&quot;,
&quot;example&quot;: 12345678,
&quot;maximum&quot;: 999999999999999,
&quot;minimum&quot;: 1000,
&quot;type&quot;: &quot;integer&quot;
},
&quot;phone_country_code&quot;: {
&quot;description&quot;: &quot;Phone country code (13 digits)&quot;,
&quot;example&quot;: 45,
&quot;maximum&quot;: 999,
&quot;minimum&quot;: 1,
&quot;type&quot;: &quot;integer&quot;
}
},
&quot;required&quot;: [
&quot;phone_country_code&quot;,
&quot;phone&quot;,
&quot;password&quot;
],
&quot;type&quot;: &quot;object&quot;
},
{
&quot;properties&quot;: {
&quot;password&quot;: {
&quot;format&quot;: &quot;password&quot;,
&quot;maxLength&quot;: 255,
&quot;minLength&quot;: 8,
&quot;type&quot;: &quot;string&quot;
},
&quot;subuser_id&quot;: {
&quot;description&quot;: &quot;Subuser ID&quot;,
&quot;example&quot;: 42,
&quot;type&quot;: &quot;integer&quot;
}
},
&quot;required&quot;: [
&quot;subuser_id&quot;,
&quot;password&quot;
],
&quot;type&quot;: &quot;object&quot;
},
{
&quot;properties&quot;: {
&quot;password&quot;: {
&quot;format&quot;: &quot;password&quot;,
&quot;maxLength&quot;: 255,
&quot;minLength&quot;: 8,
&quot;type&quot;: &quot;string&quot;
},
&quot;username&quot;: {
&quot;example&quot;: &quot;jdoe&quot;,
&quot;maxLength&quot;: 255,
&quot;minLength&quot;: 3,
&quot;type&quot;: &quot;string&quot;
}
},
&quot;required&quot;: [
&quot;username&quot;,
&quot;password&quot;
],
&quot;type&quot;: &quot;object&quot;
}
]
}
</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">
{
&quot;oneOf&quot;: [
{
&quot;properties&quot;: {
&quot;session&quot;: {
&quot;description&quot;: &quot;Newly generated subuser session token&quot;,
&quot;example&quot;: &quot;2f7a8c0e-9b1d-4c6a-91a9-1a2b3c4d5e6f&quot;,
&quot;type&quot;: &quot;string&quot;
}
},
&quot;required&quot;: [
&quot;session&quot;
],
&quot;type&quot;: &quot;object&quot;
},
{
&quot;properties&quot;: {
&quot;2fa_required&quot;: {
&quot;example&quot;: true,
&quot;type&quot;: &quot;boolean&quot;
},
&quot;2fa_token&quot;: {
&quot;description&quot;: &quot;Temporary 2FA verification token&quot;,
&quot;example&quot;: &quot;557a3e7b1a2b...&quot;,
&quot;type&quot;: &quot;string&quot;
}
},
&quot;required&quot;: [
&quot;2fa_required&quot;,
&quot;2fa_token&quot;
],
&quot;type&quot;: &quot;object&quot;
}
]
}
</code-block>
</chapter>
</topic>