# Using Two Authentication Methods Simultaneously (Digest and JWT)

**URL:** <https://discourse.cakephp.org/t/using-two-authentication-methods-simultaneously-digest-and-jwt/2834>\
**Category:** Uncategorized\
**Created:** [July 4, 2017, 7:10pm UTC](https://discourse.cakephp.org/t/using-two-authentication-methods-simultaneously-digest-and-jwt/2834 "2017-07-04T19:10:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jigzat](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jigzat](https://discourse.cakephp.org/u/jigzat)\
**Post date:** [July 4, 2017, 7:10pm UTC](https://discourse.cakephp.org/t/using-two-authentication-methods-simultaneously-digest-and-jwt/2834/1 "2017-07-04T19:10:47Z")

</div>

Hello everyone, I have been tinkering around with Cakephp for a while, I’m developing an API with JWT. I finally managed to make it work, but I want to use JWT for the API only and use Digest for the website.

I basically have two AppControllers one inside the controllers folder and the other one inside de API subfolder. I thought it was possible but it looks like I can only use one. I was having issues with the Digest authentication until I realize that the trace log ended in my ADmad JWT authentication file.

PD: On a side note I might have found a bug, do I report it to the Github page?

---

<div class="post-metadata">

**Author:** ![jigzat](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jigzat](https://discourse.cakephp.org/u/jigzat)\
**Post date:** [July 8, 2017, 4:24pm UTC](https://discourse.cakephp.org/t/using-two-authentication-methods-simultaneously-digest-and-jwt/2834/2 "2017-07-08T16:24:27Z")

</div>

Ok, it is totally posible I was having issues because I was importing the same base AppController.php in the controllers, you must import the corresponding one inside each controller subfolder.
