> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sign_jwt

> Step function: sign_jwt

Signs a JWT with a private key, for later requests to use as a credential.

## Input

<Tabs>
  <Tab title="v1">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`algorithm`</td>
          <td>Signing algorithm. Only RS256 is supported.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`claims`</td>
          <td>Claims to include in the JWT payload, such as `iss`, `scope`, and `aud`. `iat` and `exp` are required numbers with `exp` after `iat`, and accept `now` or `now+&lt;N&gt;s|m|h` tokens.</td>
          <td>object</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`privateKey`</td>
          <td>PEM-encoded private key used to sign the token.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

## Output

<Tabs>
  <Tab title="v1">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`expiresIn`</td>
          <td>Token lifetime in seconds.</td>
          <td>number</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`publicKeyFingerprint`</td>
          <td>Fingerprint of the public key matching the signing key.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`token`</td>
          <td>The signed JWT.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.