Do you can an exception stacktrace on app or auth server?
On 1/26/2016 2:16 PM, Alex Gouvêa Vasconcelos wrote:
Hi guys. I'm running into some trouble here...
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.
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<module-name>teste</module-name>
<filter>
<filter-name>CORSFilter</filter-name>
<filter-class>br.com.test.tms.teste.util.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CORSFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
<distributable />
<security-constraint>
<web-resource-collection>
<web-resource-name>teste</web-resource-name>
<url-pattern>/rest/exemploService/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>KEYCLOAK</auth-method>
<realm-name>realmtest</realm-name>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
<security-role>
<role-name>admin</role-name>
</security-role>
</web-app>
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:
http://localhost:8080/teste/?code=X8VlnUNxYzofJDHzkx1ZmMgO2BP0ZDJ-e2l7uB0...
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.
I'm running everything in the same application under wildfly 10. Both
the server and client sides in the same deployed WAR.
I'd appreciate any help.
Best regards.
Alex Gouvea Vasconcelos
Imagem inline 1
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev