# com.auth0.AuthenticationController not working for Spring Boot 3.0

**URL:** <https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412>\
**Category:** Get Help\
**Tags:** other, community-topic\
**Created:** [January 3, 2023, 4:03pm UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412 "2023-01-03T16:03:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard.sanigar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/richard.sanigar/32/23147_2.png) [@richard.sanigar](https://community.auth0.com/u/richard.sanigar)\
**Post date:** [January 3, 2023, 4:03pm UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/1 "2023-01-03T16:03:47Z")

</div>

Hi

I previously have a Spring Boot 2.7.6 / Java 11 application that used the com.auth0.AuthenticationController to build my Authorize Url.

Moving to Spring Boot 3.0.1 / Java 17, the application now fails because the AuthenticationController uses javax.servlet.http.HttpServletRequest and javax.servlet.http.HttpServletResponse . SpringBoot 3.0 which uses Tomcat 10.0 is expecting jakarta.servlet.http.HttpServletRequest.

I get the “No primary or single unique constructor found for interface javax.servlet.http.HttpServletRequest” error

Now I can use Spring Boot 3.0.1, if I use the spring-boot-starter-oauth2-client library but I really want to use the AuthenticationController as I can append the ui\_locales query parameter to the Authorize Url to control localisation of the Auth0 login widget.

When will a Spring Boot 3.0 update be available for the com.auth0.AuthenticationController i.e an update to the mvc-auth-commons jar?

Has anyone found a work around. The key issue is the ability to append the ui\_locales to the Authorize URL.

Thanks in advance

Richard

---

<div class="post-metadata">

**Author:** ![richard.sanigar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/richard.sanigar/32/23147_2.png) [@richard.sanigar](https://community.auth0.com/u/richard.sanigar)\
**Post date:** [January 4, 2023, 12:29pm UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/2 "2023-01-04T12:29:53Z")

</div>

Hi All

Here’s my work around for my Spring Boot 3 / Java 17 project

In your project (I use Eclipse), create a package called com.auth0  
From the mvc-auth-commons jar file edit the following classes (I pre-appended Auth0 to the class names to ensure no conflicts):

AuthenticationController  
AuthorizeUrl  
RandomStorage  
RequestProcessor  
SessionUtils  
TransientCookieStore

Change all references of javax.servlet.http to jakarta.servlet.http

For some reason I have to add public to the RandomStorage class because of a visibility issue.

So the bottom line is, Auth0 need to release an update to the mvc-auth-commons jar the current version is 1.9.3.

Good luck

Richard

---

<div class="post-metadata">

**Author:** ![watson.rajee49](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/watson.rajee49/32/44699_2.png) [@watson.rajee49](https://community.auth0.com/u/watson.rajee49)\
**Post date:** [February 16, 2023, 1:47pm UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/3 "2023-02-16T13:47:15Z")

</div>

> [@richard.sanigar](#):
>
> -auth-commons jar file edit the following classes (I pre-appended Auth0 to the class names to ensure no conflicts):
> 
> AuthenticationController  
> AuthorizeUrl  
> RandomStorage  
> RequestProcessor  
> SessionUtils  
> TransientCookieStore
> 
> Change all references of javax.servlet.http to jakarta.servlet.http
> 
> For some reason I have to add public to

Hi Richard,

Am facing the same issue, am using spring boot 3, Java 17 and httpclient5.  
Can you be more specific on the solutions? Like, any example would be great and appreciated. Thank you.

---

<div class="post-metadata">

**Author:** ![richard.sanigar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/richard.sanigar/32/23147_2.png) [@richard.sanigar](https://community.auth0.com/u/richard.sanigar)\
**Post date:** [February 17, 2023, 10:54am UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/4 "2023-02-17T10:54:20Z")

</div>

Hi Rajee

I you find me on LinkedIn and send me a message, then I can send you a zipped file of an example SpringBoot 3.0 app that authenticates with Auth0

Kind regards

Richard

---

<div class="post-metadata">

**Author:** ![rob13](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rob13/32/46047_2.png) [@rob13](https://community.auth0.com/u/rob13)\
**Post date:** [June 3, 2023, 2:39am UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/5 "2023-06-03T02:39:00Z")

</div>

Thank you Richard. This work around helped me out of a bind!

---

<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:** [June 17, 2023, 2:39am UTC](https://community.auth0.com/t/com-auth0-authenticationcontroller-not-working-for-spring-boot-3-0/97412/6 "2023-06-17T02:39:20Z")

</div>

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