> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/pipes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/pipes/valves/jwt/parsejwt.md).

# ParseJwt

Parses a JSON Web Token, JWT and verifies the signature. Claims is put on the current item.

## Configuration

{% hint style="info" %}
**Valve name:** `ParseJwt`
{% endhint %}

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="318">Name</th><th width="246">Description</th><th width="299">Default value</th><th width="118" data-type="checkbox">Mandatory</th><th width="114" data-type="checkbox">Expanded</th></tr></thead><tbody><tr><td><code>jwt_src</code></td><td>Source of the JWT.</td><td><code>"${request.access_token}"</code></td><td>false</td><td>true</td></tr><tr><td><code>verify_token</code></td><td>If the signature should be verified.</td><td><code>true</code></td><td>false</td><td>false</td></tr><tr><td><code>internal_http_destination</code></td><td>HTTP module reference. Mandatory if <code>jwks_endpoint</code> is used to fetch public key.</td><td>N/A</td><td>false</td><td>false</td></tr><tr><td><code>jwks_endpoint</code></td><td>JWKS endpoint.</td><td>N/A</td><td>false</td><td>false</td></tr><tr><td><code>keystore</code></td><td>Keystore reference or json object containing keystore configuration.  Used to verify JWT signature.</td><td>N/A</td><td>false</td><td>false</td></tr><tr><td><code>keystore_alias</code></td><td>Keystore alias.</td><td>N/A</td><td>false</td><td>false</td></tr><tr><td><code>sign_algorithm</code></td><td>Algorithm used when signature was created.</td><td><code>"RS256"</code></td><td>false</td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

<pre class="language-json"><code class="lang-json"><strong>Example with local keystore for signature validation:
</strong>{
    "name": "ParseJwt",
    "config": {
        "jwt_src": "${session.access_token}",
        "keystore": {
             "path": "/fortified_test/config/keystore.p12",
             "password": "secret",
             "type": "PKCS12"
        },
        "keystore_alias" : "jwt"
    }
}

Example with jwks_endpoint to fetch key for signature validation:
{
    "name": "ParseJwt",
    "config": {
        "jwt_src": "${session.access_token}",
        "internal_http_destination": "http_client_1",
        "jwks_endpoint": "http://192.168.50.228:8080/oidc/tenant1/.well-known/openid-configuration/jwks"
    }
}
</code></pre>

{% endtab %}
{% endtabs %}
