---
title: "JWT Verify"
description: "Verify a JSON web token signature and claims."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/crypto/jwt-verify"
---
# JWT Verify

> Verify a JSON web token signature and claims.

<block-meta block="Yes" channels="Any" folder="crypto" group="Crypto" groupTo="/build/workflows/blocks/crypto" icon="i-lucide-badge-check" pipe="Value" scope="Any" tool="Yes" type="crypto.jwt.verify">



</block-meta>

**JWT Verify** checks the signature, pins **Algorithm**, and optionally checks audience, issuer, subject, JWT id, and time claims. Invalid tokens do **not** continue on the success outlet. [JWT Decode](https://docs.vettero.com/build/workflows/blocks/crypto/jwt-decode) does **not** replace this for authentication.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Token
      </strong>
    </td>
    
    <td>
      Compact JWT (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Key type
      </strong>
    </td>
    
    <td>
      <strong>
        Passphrase (HMAC)
      </strong>
      
       or <strong>
        PEM key
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Secret
      </strong>
    </td>
    
    <td>
      HMAC secret when key type is passphrase
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Public key
      </strong>
    </td>
    
    <td>
      PEM public key when key type is PEM
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Algorithm
      </strong>
    </td>
    
    <td>
      Must match how the token was signed
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Audience
      </strong>
    </td>
    
    <td>
      Expected <code>
        aud
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Issuer
      </strong>
    </td>
    
    <td>
      Expected <code>
        iss
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Subject
      </strong>
    </td>
    
    <td>
      Expected <code>
        sub
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        JWT ID
      </strong>
    </td>
    
    <td>
      Expected <code>
        jti
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Clock tolerance (seconds)
      </strong>
    </td>
    
    <td>
      Slack for <code>
        exp
      </code>
      
       and <code>
        nbf
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Ignore expiration
      </strong>
    </td>
    
    <td>
      Skip the <code>
        exp
      </code>
      
       check
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Ignore not before
      </strong>
    </td>
    
    <td>
      Skip the <code>
        nbf
      </code>
      
       check
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Return additional info
      </strong>
    </td>
    
    <td>
      Off: payload only. On: header, payload, and signature
    </td>
  </tr>
</tbody>
</table>

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues only when the token is valid
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Error
      </strong>
    </td>
    
    <td>
      Catchable failures: missing token or key (<code>
        MISSING_VALUE
      </code>
      
      ), or invalid signature, algorithm, or claims (<code>
        JWT_INVALID
      </code>
      
      )
    </td>
  </tr>
</tbody>
</table>

Connect [Branch errors](https://docs.vettero.com/build/workflows/blocks/error/branch) to **Error** to split those codes.

## Pipe schema

On success the pipe is the payload object. With **Return additional info** it is an object with `header`, `payload`, and `signature`.

Catch errors with a block **Error** outlet or [Try](https://docs.vettero.com/build/workflows/blocks/error/try).

## Use case

- Trust `Authorization: Bearer …` on an [HTTP Server](https://docs.vettero.com/build/http-servers) handler.
- Check a token you minted with [JWT Sign](https://docs.vettero.com/build/workflows/blocks/crypto/jwt-sign).

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
