<?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="Authentication" id="Authentication">

    <p>The API uses the <code>BearerAuth</code> security scheme (HTTP Bearer, JWT).</p>

    <chapter title="Bearer JWT Header" id="api-token">
        <p>Get a token from <code>/auth/login</code> or <code>/auth/employee/login</code>, then send:</p>
        <code-block lang="http">
            Authorization: Bearer YOUR_API_TOKEN
        </code-block>
    </chapter>

    <chapter title="Subuser Customer Targeting" id="subuser-customer-targeting">
        <p>When authenticated as a subuser, include a target customer header for customer-scoped endpoints:</p>
        <code-block lang="http">
            X-Customer-Number: 123456
        </code-block>
    </chapter>
</topic>
