# Validating the JWT token with database in php

**URL:** <https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851>\
**Category:** JWT.io\
**Tags:** php\
**Created:** [June 17, 2020, 2:31pm UTC](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851 "2020-06-17T14:31:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![urajesh647](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/urajesh647/32/12753_2.png) [@urajesh647](https://community.auth0.com/u/urajesh647)\
**Post date:** [June 17, 2020, 2:31pm UTC](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851/1 "2020-06-17T14:31:19Z")

</div>

Hi guys, I am new to JWT and I have been working with JWT authentication in php. Generated the token with JWT::encode and send it through header and decoded by JWT::decode method. My problem is that how can I validate this JWT token with database in php. What are the predefined methods of JWT to be used to validate JWT token. In java, we have filters and interceptors and in same way what are the filters and equivalent interceptors in php to validate the JWT token with database in php.  
Thanks in advanced

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 23, 2020, 4:47pm UTC](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851/3 "2020-06-23T16:47:04Z")

</div>

Hi @urajesh647,

Welcome to the Community!

We have some documentation on how to verify a JWT when using a PHP API. Maybe it will provide some insight.

> **[Auth0 PHP API SDK Quickstarts: Authorization](https://auth0.com/docs/quickstart/backend/php/01-authorization#validate-access-tokens)**
>
> This guide demonstrates how to integrate Auth0 with a PHP backend API using the Auth0 PHP SDK.

Let me know if this helps!  
Dan

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 8, 2020, 4:47pm UTC](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851/4 "2020-07-08T16:47:07Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
