On Mon, Nov 2, 2009 at 3:47 PM, Marvin Addison <[email protected]>wrote:

> <snip />
>
> I'm familiar with this implementation.  The CAS 2 protocol supports
> both a code and a description, but only the former is passed to
> clients in many important cases.
>

That's an incorrect statement.

You didn't follow the code:

    private ModelAndView generateErrorView(final String code,
        final String description, final Object[] args) {
        final ModelAndView modelAndView = new
ModelAndView(this.failureView);
        modelAndView.addObject("code", code);
        modelAndView.addObject("description", getMessageSourceAccessor()
            .getMessage(description, args, description));

        return modelAndView;
    }

The error code is looked up in the messages.properties file.  Again, I'm
quite confident you've seen a CAS server validation error and seen the
appropriate messages being returned and not the code. As I mentioned before,
one key error message that is returned is when the service url doesn't match
the one originally given.  The solution currently provided allows for
internationalized error messages.

The "code" is only used in the description when the code doesn't map to
anything.  Which would imply that someone deleted the properties from the
messages.properties file.  Having the messages externalized into the
properties also allows clients to provide additional information if they
want to.

Cheers,
Scott


 <snip />


>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-dev
>
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to