[keycloak-user] Not able to forward to error page.

Marek Posolda mposolda at redhat.com
Tue Jun 2 04:17:08 EDT 2015


On 1.6.2015 14:44, John wrote:
> I am trying to integarte keycloak authentication for securing my application.
> My server and client has different error status code mapping.
>
> In case of accessToken expires keycloak sends 401 directly to client
> where I have mapped token expiration to status code 5401.
>
> I do not wish to change this mapping as code is already in production phase.
>
> I found very helpful way to handle this situaltion by providing
> error-page in my server web.xml as
>
> <login-config>
> <auth-method>KEYCLOAK</auth-method>
> <realm-name>winterfell</realm-name>
> <form-login-config>
> <form-error-page>/error</form-error-page>
> </form-login-config>
> </login-config>
>
> But somehow I am not able to get this error page.
>
> Can someone please suggest correct way of doing this.
>
> Note : Following way didn't worked for me
> <error-page>
> <error-code>404</error-code>
> <location>/error</location>
> </error-page>
Will it work if you use status 401 instead of 404?

Marek
>
>
>
> -TR
> John
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user



More information about the keycloak-user mailing list