[keycloak-user] Invalid URI redirect using j_security_check

Victor Neves Evangelista victor.evangelista at caixa.gov.br
Tue Nov 3 09:27:49 EST 2015


Original question https://issues.jboss.org/browse/KEYCLOAK-2029



Hi,

I'm studing how integrate my applications whit keycloak whit minor impact.
I'm using JBoss EAP 6.3.0, i instaled keycloak adapters like reference guide says in chapter 8 and keycloak 1.6.0.

#1 I have a form html:

        <form class="form-signin" id="loginform" action="j_security_check" method="POST" >


            <label for="inputUsernamel" class="sr-only">Usu&aacute;rio</label>


            <input name="j_username" type="text" id="usuario" class="form-control" placeholder="Usuario" required autofocus >





            <label for="inputPassword" class="sr-only">Senha</label>


            <input name="j_password" type="password" id="senha" class="form-control" placeholder="Senha" required >





            <button class="btn btn-lg btn-primary btn-block" type="submit" id="btnLogin" >Acessar</button>


        </form>


#2 In my web.xml i have <auth-method>KEYCLOAK</auth-method>

#3 I have WEB-INF/keycloak.json like reference says.

#4 my client is configured like image attached

#5 When i send a user and pass in html form i have:

We're sorry ...
Invalid parameter: redirect_uri

#6 the keycloak log sasy:
12:14:26,904 DEBUG [org.jboss.ejb.client.txn] (Periodic Recovery) Send recover request for transaction origin node identifier 1 to EJB receiver with node name cd7390sx006
12:14:33,270 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] (default task-24) PathInfo: /realms/laboratorio/protocol/openid-connect/auth
12:14:33,273 DEBUG [org.keycloak.protocol.oidc.utils.RedirectUtils] (default task-24) replacing relative valid redirect with: /sisduweb/
12:14:33,273 WARN [org.keycloak.events] (default task-24) type=LOGIN_ERROR, realmId=laboratorio, clientId=sisdu, userId=null, ipAddress=10.208.20.97, error=invalid_redirect_uri, response_type=code, redirect_uri=http://10.208.20.97:8080/sisduweb/j_security_check*
12:14:33,274 DEBUG [freemarker.cache] (default task-24) TemplateLoader.findTemplateSource("template_pt_BR.ftl"): Not found
12:14:33,274 DEBUG [freemarker.cache] (default task-24) TemplateLoader.findTemplateSource("template_pt.ftl"): Not found
12:14:33,274 DEBUG [freemarker.cache] (default task-24) TemplateLoader.findTemplateSource("template.ftl"): Found
12:14:33,275 DEBUG [freemarker.cache] (default task-24) "template.ftl"("pt_BR", UTF-8, parsed): using cached since file:/opt/kc/keycloak-1.6.0.Final/standalone/configuration/themes/base/login/template.ftl<file:///\\opt\kc\keycloak-1.6.0.Final\standalone\configuration\themes\base\login\template.ftl> hasn't changed.
12:14:33,277 DEBUG [freemarker.cache] (default task-24) "template.ftl"("pt_BR", UTF-8, parsed) cached copy not yet stale; using cached.
12:14:33,280 DEBUG [freemarker.cache] (default task-24) "template.ftl"("pt_BR", UTF-8, parsed) cached copy not yet stale; using cached.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151103/b1f20024/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kc.png
Type: image/png
Size: 26422 bytes
Desc: kc.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20151103/b1f20024/attachment-0001.png 


More information about the keycloak-user mailing list