How to send custom IDP errors
Cantor, Scott
cantor.2 at osu.edu
Sun Jul 28 23:46:42 EDT 2013
On 7/28/13 11:21 PM, "kotesh201" <koteshwarv at gmail.com> wrote:
>Saml2LoginContext samlLoginCtx = null;
>samlLoginCtx = (Saml2LoginContext)
>req.getAttribute(ServerConsts.SAML_LOGIN_CONTEXT_KEY);
>samlLoginCtx.setAuthenticationFailure(new AuthenticationException("Send
>sample idp custom validation exception message to Service Provider"));
>request.setAttribute(ServerConsts.SAML_LOGIN_CONTEXT_KEY,samlLoginCtx);
>AuthenticationEngine.returnToAuthenticationEngine( request, response );
See the LoginHandler API javadoc for the supported interface. You need to
send back specific servlet attributes yourself, not mess with the login
context.
>After I set the custom idp validation exception, setting the login context
>back into the request and sending to the AuthenticationEngine. With above
>code change, IDP is not processing anything. I dont see anything in the
>logs
>after above code executed. It just hung.
Whatever you did is probably causing the error, but there's no point in
looking into it because it's incorrect behavior anyway.
-- Scott
More information about the users
mailing list