Skip to content
Advertisement

java.lang.IllegalArgumentException: Unable to resolve the Configuration with the provided Issuer

I’m trying to make a working demo using Spring Boot as a Resource Server and Keycloak as an Authorization Server. Here is project code snippets:

pom.xml

JavaScript

App.java

JavaScript

AppRestController.java

JavaScript

application.properties

JavaScript

I’m running Keycloak on the port 8083. Get request to the http://localhost:8083/realms/realm_1/.well-known/openid-configuration returns the following response:

JavaScript

To get an access token, I send a post request to the http://localhost:8083/realms/realm_1/protocol/openid-connect/token with password grand type and get the following response:

JavaScript

Then, I send get request to the http://localhost:8080/permitAll and get 401 response status and the following stacktrace in the logs:

JavaScript

Advertisement

Answer

Should just be this in application.properties

JavaScript

The issuer should match the issuer from the Keycloak configuration URL.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement