REST Api on Wildfly

Hello,

I can successfully retrieve the oAuth token when my app is running on my local development tomcat server. However, when I deploy it to the production Wildfly server, I get the following response when trying to retrieve the token:

<html><head><title>Error</title></head><body>Unauthorized</body></html>

Is there an additional configuration option that I have to set when running on Wildfly?

Thanks.

Hi,

  1. What platform version do you use?
  2. What is Wildfly version?
  3. Did you do all the steps for setting up the wildfly server described in the documentation?
  4. Are there any errors in the application log file? Could you please share if there are any.

Hi Maxim,

  1. The platform version is 7.2.15
  2. Wildfly version is 25
  3. Yes I followed these steps
  4. No errors are produced in the log file.

After some more digging, I found the solution. The REST client id and secret need to be used to add a user to the ApplicationRealm in Wildfly security. See this link for more info

https://courses.bekwam.net/public_tutorials/bkcourse_wildfly_basic_auth.html

2 Likes