<div dir="ltr">Hello Keycloak team,<div><br></div><div>I&#39;m trying to move my OAuth2 demo app from Keyclaok 1.5 to Keyclaok 1.9.1.</div><div>I&#39;ve change the OAuth2 endpoints for the access token. I manage the Oauth2 dansc ok but when trying to access a protected resource I hit the error:</div><div><br></div><div><div><font size="1">22:00:13,501 ERROR [org.keycloak.adapters.BearerTokenRequestAuthenticator] (default task-101) Failed to verify token: org.keycloak.common.VerificationException: Realm URL is null. Make sure to add auth-server-url to the configuration of your adapter!</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.RSATokenVerifier.verifyToken(RSATokenVerifier.java:46)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.RSATokenVerifier.verifyToken(RSATokenVerifier.java:35)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.BearerTokenRequestAuthenticator.authenticateToken(BearerTokenRequestAuthenticator.java:87)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.BearerTokenRequestAuthenticator.authenticate(BearerTokenRequestAuthenticator.java:82)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.RequestAuthenticator.authenticate(RequestAuthenticator.java:65)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.undertow.AbstractUndertowKeycloakAuthMech.keycloakAuthenticate(AbstractUndertowKeycloakAuthMech.java:110)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.undertow.ServletKeycloakAuthMech.authenticate(ServletKeycloakAuthMech.java:92)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:233)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:250)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.access$100(SecurityContextImpl.java:219)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl.attemptAuthentication(SecurityContextImpl.java:121)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:96)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:89)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:55)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</font></div><div><font size="1"><span class="" style="white-space:pre">        </span>at java.lang.Thread.run(Thread.java:745)</font></div><div><br></div></div><div>My realm setup is here:</div><div><a href="https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json">https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json</a><br></div><div><br></div><div>The keycloak.json used for the protected endpoint is:</div><div><a href="https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/src/main/webapp/WEB-INF/keycloak.json">https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/src/main/webapp/WEB-INF/keycloak.json</a><br></div><div><br></div><div>Is there some specific settings I should add to work with Keycloak 1.9.x?</div><div><br></div><div>Your help would be welcome.</div><div><br></div><div>++</div><div>Corinne</div></div>