Hi, Indeed, a logger.error would have been appreciated in the "catch (TicketException" part.
Yes, the "restore" methods are the ones the comment is referring to. And they are called before the exception is thrown: all parameters should be restored. I've spent some time to perform a full test and the theme is properly restored through RequestContextUtil.getTheme. Here is the demo I setup: https://github.com/leleuj/cas-oauth-demo-3.5.x/commit/8ccb17d18a1b2fbd3049022ce88455c581328bed . I define a theme for my service and throw an exception as if the authentication has failed -> the theme is properly restored and generates an error (I have not that theme)... Hope it helps. Best regards, Jérôme Jérôme LELEU Founder of CAS in the cloud: www.casinthecloud.com | Twitter: @leleuj Chairman of CAS: www.jasig.org/cas | Creator of pac4j: www.pac4j.org 2014-06-17 0:25 GMT+02:00 Jonathan <jhs...@mit.edu>: > The exception I got appears to have been caught and handled by > CAS/OAuthAction. There's not much of a trace in the log. > > OAuthAction.doExecute: > . > . > . > } catch (final TicketException e) { > return error(); > } > > > cas.log > 2014-06-16 18:07:07,023 INFO > org.jasig.cas.authentication.AuthenticationManagerImpl - > edu.cas.service.implementation.OAuthAuthenticationHandlerImplementation > failed authenticating > org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@27f34293 > > cas-authentication.log > 2014-06-16 18:08:43,338 INFO Audit trail record BEGIN > ============================================================= > WHO: > org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@27f34293 > WHAT: error.authentication.credentials.bad.usernameorpassword > ACTION: TICKET_GRANTING_TICKET_NOT_CREATED > APPLICATION: CAS > WHEN: Mon Jun 16 18:08:43 EDT 2014 > CLIENT IP ADDRESS: 127.0.0.1 > SERVER IP ADDRESS: 127.0.0.1 > ============================================================= > > Again, the problem seems to be that when RequestContextUtil.getTheme is > eventually called, the default theme is used because the service parameter > is null. > > > The following is the comment for the OAuthAction class: > > /** > * This class represents an action in the webflow to retrieve OAuth > information on the callback url which is the webflow url (/login). The > * {@link org.jasig.cas.support.oauth.OAuthConstants.OAUTH_PROVIDER} and > the other OAuth parameters are expected after OAuth authentication. > * Providers are defined by configuration. The {@link > org.jasig.cas.support.oauth.OAuthConstants.SERVICE}, > * {@link org.jasig.cas.support.oauth.OAuthConstants.THEME}, {@link > org.jasig.cas.support.oauth.OAuthConstants.LOCALE} and > * {@link org.jasig.cas.support.oauth.OAuthConstants.METHOD} parameters > are saved and restored from web session after OAuth authentication. > * > * @author Jerome Leleu > * @since 3.5.0 > */ > > Is the comment about restoring parameters from the web session referring > to the following code? > > // retrieve parameters from web session > final Service service = (Service) > session.getAttribute(OAuthConstants.SERVICE); > context.getFlowScope().put(OAuthConstants.SERVICE, service); > restoreRequestAttribute(request, session, > OAuthConstants.THEME); > restoreRequestAttribute(request, session, > OAuthConstants.LOCALE); > restoreRequestAttribute(request, session, > OAuthConstants.METHOD); > > > Thanks, > > -- > You are currently subscribed to cas-user@lists.jasig.org as: > lel...@gmail.com > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > -- You are currently subscribed to cas-user@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user