Hi Vincent.  Thanks for finding this.  Sorry I missed it when I merged the services.  I have a question.  It looks to me you'd need to make a similar change in EmailAccountService.clearInboxCache as well for CAS integration or the username would be null and the key wouldn't match.

Also I'm considering an alternate change I wanted to run past you.  I'd like to keep the logic within the credentials service and not expose differences and special cases out to the services layer.  I'm contemplating changing CasAuthenticationService.getCredentials to construct a Credential, similar to how CasAuthenticationService.getAuthenticator works (and its parallel in the other AuthenticationService classes).  I'm not terribly familiar with CAS integration but I wondered if it would be a problem having casTicketService.getCasServiceToken(casAssertion, serviceUrl) called twice (once in CasAuthenticationService.getAuthenticator and again in CasAuthenticatinService.getCredentials. I think would we need to store the casServiceTicket in http session instead of the proxyTicket.  If I'm right the code in the EmailAccountService and MailCredentialsProvider wouldn't need to change.  Do you have thoughts on or concerns with this approach?