<html><head></head><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:14px"><div id="yui_3_16_0_1_1453279005988_2861"><span>Hi, Alexander,</span></div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div><div id="yui_3_16_0_1_1453279005988_2861"><span id="yui_3_16_0_1_1453279005988_3248"> We deploy the client application server (wildfly) and auth server (keycloak) in the same machine. </span></div><div id="yui_3_16_0_1_1453279005988_2861"><span id="yui_3_16_0_1_1453279005988_3052"> The web app url is : <a href="http://ourhost.com/hello/index.html" id="yui_3_16_0_1_1453279005988_3049">http://ourhost.com/hello/index.html</a></span></div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"> the auth server is https://ourhost.com/auth</div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"><br></div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"> then the setup in keycloak.json should be :</div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"><br></div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"> </div><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"><a id="relative-uri-optimization" style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: justify;" class="" href=""></a></div><pre xmlns="" xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory" class="" style="font-size: 0.9em; font-family: courrier, monospace; display: block; color: rgb(51, 51, 51); overflow: auto; padding: 5px 15px 5px 25px; border: 1px solid rgb(204, 204, 204); background-color: rgb(245, 245, 245);" id="yui_3_16_0_1_1453279005988_3273">"auth-server-url": "/auth",
"auth-server-url-for-backend-requests": "https://ourhost/auth"
</pre><div id="yui_3_16_0_1_1453279005988_2861" dir="ltr"><br></div><div id="yui_3_16_0_1_1453279005988_2861"> This can reduce the round trip?</div><div id="yui_3_16_0_1_1453279005988_2861"><br></div><div id="yui_3_16_0_1_1453279005988_2861"><br></div><div id="yui_3_16_0_1_1453279005988_2861">Thanks a lot </div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div><div id="yui_3_16_0_1_1453279005988_2861"><span><br></span></div> <div class="qtdSeparateBR" id="yui_3_16_0_1_1453279005988_2918"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_1_1453279005988_2913" style="display: block;"> <div style="font-family: garamond, new york, times, serif; font-size: 14px;" id="yui_3_16_0_1_1453279005988_2912"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1453279005988_2911"> <div dir="ltr" id="yui_3_16_0_1_1453279005988_2917"><font size="2" face="Arial" id="yui_3_16_0_1_1453279005988_2916"> On Wednesday, January 20, 2016 3:56 PM, Alexander Schwartz <alexander.schwartz@gmx.net> wrote:<br></font></div> <br><br> <div class="y_msg_container" id="yui_3_16_0_1_1453279005988_2910"><div id="yiv1127881345"><div id="yui_3_16_0_1_1453279005988_2909"><div style="font-family:Verdana;font-size:12.0px;" id="yui_3_16_0_1_1453279005988_2908"><div id="yui_3_16_0_1_1453279005988_2915">During the last phase of OAuth negotation the client application (here: wildfly) will contact the oauth server (here: keycloak) to change the code into a token.</div>
<div id="yui_3_16_0_1_1453279005988_2914"> </div>
<div id="yui_3_16_0_1_1453279005988_2907">In order to work the client application (here: wildfly) must be able to contact the keycloak server using the auth-server-url given in keycloak.json.</div>
<div id="yui_3_16_0_1_1453279005988_2990"> </div>
<div id="yui_3_16_0_1_1453279005988_2989">If this URL is only accessible browsers from external / via a load balancer, and client application should use a different (direct) URL to reach the keycloak server you can specify auth-server-url-for-backend-requests in your keycloak.json</div>
<div id="yui_3_16_0_1_1453279005988_2988"> </div>
<div id="yui_3_16_0_1_1453279005988_2987">Best regards,</div>
<div id="yui_3_16_0_1_1453279005988_2978">Alexander</div>
<div id="yui_3_16_0_1_1453279005988_2986"> </div>
<div class="yiv1127881345signature" id="yui_3_16_0_1_1453279005988_2985">--<br clear="none">
Alexander Schwartz (alexander.schwartz@gmx.net)<br clear="none">
http://www.ahus1.de</div>
<div id="yui_3_16_0_1_1453279005988_2983">
<div id="yui_3_16_0_1_1453279005988_2982">
<div style="margin:10px 5px 5px 10px;padding:10px 0 10px 10px;border-left:2px solid #C3D9E5;word-wrap:break-word;" id="yui_3_16_0_1_1453279005988_2981">
<div style="margin:0 0 10px 0;" id="yui_3_16_0_1_1453279005988_2984"><b>Gesendet:</b> Mittwoch, 20. Januar 2016 um 05:23 Uhr<br clear="none">
<b>Von:</b> "Mai Zi" <ornot2008@yahoo.com><br clear="none">
<b>An:</b> Keycloak-user <keycloak-user@lists.jboss.org><br clear="none">
<b>Betreff:</b> [keycloak-user] What can bring this error "failed to turn code into token" over and over again?</div>
<div class="yiv1127881345yqt9364272955" id="yiv1127881345yqt99376"><div id="yui_3_16_0_1_1453279005988_2980">
<div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:garamond , new york , times , serif;font-size:14.0px;" id="yui_3_16_0_1_1453279005988_2979">
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506">We get lots of errors like this:</div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506">2016-01-20 12:02:37,441 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-1) failed to turn code into token: java.net.SocketException: Connection timed out</div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506">and which makes the login slow or failed .</div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506">We are using keycloak 1.7.0 final and broke a SAML 2.0 IDP (ADFS). The wildfly app server and keycloak both are standalone. </div>
<div id="yiv1127881345yui_3_16_0_1_1453262753340_2506"> </div>
</div>
</div></div>
</div>
</div>
</div></div></div></div><br><br></div> </div> </div> </div></div></body></html>