<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Do you can an exception stacktrace on app or auth server?<br>
    <br>
    <div class="moz-cite-prefix">On 1/26/2016 2:16 PM, Alex Gouvêa
      Vasconcelos wrote:<br>
    </div>
    <blockquote
cite="mid:CAGGeCYOEMPOQM7=ZSZ2+JzNP6SbTsHS4BpHsTDAAsMYYTyqVMA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small;color:#073763">Hi
          guys. I'm running into some trouble here...<br>
        </div>
        <div class="gmail_quote">
          <div dir="ltr">
            <div>
              <div><font color="#073763" face="verdana, sans-serif"><br>
                </font></div>
              <div><font color="#073763" face="verdana, sans-serif">I
                  have a very simple application which should
                  authenticate against keycloak and return to the main
                  page. This is triggered through the web.xml in my
                  application.</font></div>
              <div><font color="#073763" face="verdana, sans-serif"><br>
                </font></div>
            </div>
            <blockquote style="margin:0px 0px 0px
              40px;border:none;padding:0px">
              <div>
                <div><span
                    style="color:rgb(7,55,99);font-family:monospace,monospace">&lt;web-app
                    xmlns="<a moz-do-not-send="true"
                      href="http://java.sun.com/xml/ns/javaee"
                      target="_blank">http://java.sun.com/xml/ns/javaee</a>"
                    xmlns:xsi="<a moz-do-not-send="true"
                      href="http://www.w3.org/2001/XMLSchema-instance"
                      target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"</span></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>xsi:schemaLocation="<a
                      moz-do-not-send="true"
                      href="http://java.sun.com/xml/ns/javaee"
                      target="_blank"><a class="moz-txt-link-freetext" href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a></a>
                    <a moz-do-not-send="true"
                      href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
                      target="_blank">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>"</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>version="3.0"&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;module-name&gt;teste&lt;/module-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;filter&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;filter-name&gt;CORSFilter&lt;/filter-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;filter-class&gt;br.com.test.tms.teste.util.CORSFilter&lt;/filter-class&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/filter&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;filter-mapping&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;filter-name&gt;CORSFilter&lt;/filter-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/filter-mapping&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;distributable
                    /&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;security-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;web-resource-collection&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span>&lt;web-resource-name&gt;teste&lt;/web-resource-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span>&lt;url-pattern&gt;/rest/exemploService/secure/*&lt;/url-pattern&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;/web-resource-collection&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;auth-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span>&lt;role-name&gt;*&lt;/role-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;/auth-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;user-data-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                        </span>&lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;/user-data-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/security-constraint&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;login-config&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;auth-method&gt;KEYCLOAK&lt;/auth-method&gt;</font></div>
              </div>
              <div>
                <div><span style="color:rgb(7,55,99);font-family:monospace,monospace;white-space:pre-wrap">                </span><span
style="color:rgb(7,55,99);font-family:monospace,monospace">&lt;realm-name&gt;realmtest&lt;/realm-name&gt;</span></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/login-config&gt;</font></div>
              </div>
              <div>
                <div><span style="color:rgb(7,55,99);font-family:monospace,monospace;white-space:pre-wrap">        </span><span
style="color:rgb(7,55,99);font-family:monospace,monospace">&lt;security-role&gt;</span></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;role-name&gt;user&lt;/role-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/security-role&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;security-role&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">                </span>&lt;role-name&gt;admin&lt;/role-name&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><span style="white-space:pre-wrap">        </span>&lt;/security-role&gt;</font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace"><br>
                  </font></div>
              </div>
              <div>
                <div><font color="#073763" face="monospace, monospace">&lt;/web-app&gt;</font></div>
              </div>
            </blockquote>
            <div>
              <div><font color="#073763" face="monospace, monospace"><br>
                </font></div>
              <div>
                <div>
                  <div><font color="#073763" face="verdana, sans-serif">The
                      server side has a REST API and the client side is
                      an angular application. Everything very simple to
                      just try the development environment. What happens
                      is that, after filling the login page and return
                      to the index.html (actually it's not returning), I
                      receive a 400 BAD REQUEST for the uri: </font></div>
                  <div><font color="#073763" face="verdana, sans-serif"><br>
                    </font></div>
                </div>
              </div>
            </div>
            <blockquote style="margin:0px 0px 0px
              40px;border:none;padding:0px">
              <div>
                <div>
                  <div>
                    <div><span
                        style="color:rgb(7,55,99);font-family:monospace,monospace"><a
                          moz-do-not-send="true"
href="http://localhost:8080/teste/?code=X8VlnUNxYzofJDHzkx1ZmMgO2BP0ZDJ-e2l7uB091Dk.bd5edab3-359b-4616-a403-34fffb427af9&amp;state=67b87fd5-7cc0-4415-9b8b-fc16675229a1"
                          target="_blank"><a class="moz-txt-link-freetext" href="http://localhost:8080/teste/?code=X8VlnUNxYzofJDHzkx1ZmMgO2BP0ZDJ-e2l7uB091Dk.bd5edab3-359b-4616-a403-34fffb427af9&amp;state=67b87fd5-7cc0-4415-9b8b-fc16675229a1">http://localhost:8080/teste/?code=X8VlnUNxYzofJDHzkx1ZmMgO2BP0ZDJ-e2l7uB091Dk.bd5edab3-359b-4616-a403-34fffb427af9&amp;state=67b87fd5-7cc0-4415-9b8b-fc16675229a1</a></a></span></div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div>
              <div><font color="#073763" face="monospace, monospace"><br>
                </font></div>
              <div>
                <div>
                  <div>
                    <div><font color="#073763" face="verdana,
                        sans-serif">It seems to me, that the malformed
                        URI is because of the ?code=... If I reload the
                        page with the same URL, it just return the same
                        400... if I remove the ? portion, it reloads the
                        page and again redirects to and from the
                        keycloak server, and recovers the ? portion,
                        repeating the same 400. </font></div>
                    <div><font color="#073763" face="verdana,
                        sans-serif"><br>
                      </font></div>
                    <div><font color="#073763" face="verdana,
                        sans-serif">I'm running everything in the same
                        application under wildfly 10. Both the server
                        and client sides in the same deployed WAR.</font></div>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)">I'd
                    appreciate any help.</div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)">Best
                    regards.</div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)">Alex
                    Gouvea Vasconcelos</div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><img
                      src="cid:part6.09010801.03040101@redhat.com"
                      alt="Imagem inline 1" style="margin-right:0px"
                      height="475" width="920"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                  <div
                    style="font-family:verdana,sans-serif;color:rgb(7,55,99)"><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
keycloak-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Bill Burke
JBoss, a division of Red Hat
<a class="moz-txt-link-freetext" href="http://bill.burkecentral.com">http://bill.burkecentral.com</a></pre>
  </body>
</html>