Thursday, February 25, 2010

cas 3.3.5 and utf8 passwords SUCCESS

Finally, everything is working to have CAS correctly handle authentication with utf8 passwords. The final remaining bugaboo was in my own code. We wrap CAS inside of our own value-added service and use HttpClient to communicate with CAS. HttpClient doesn't encode the posted form fields as utf8 unless you ask it to:


authpost.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");


Now we're back in business. Of course, that leaves me wondering: Did the utf8 passwords ever work before? I was operating under the assumption that I had tested the system last year to make sure foreign/special character passwords would be allowed. But if I wasn't sending utf8 passwords via HttpClient, I can hardly see how they could have been working. Perhaps that was just a gross oversight on my part.

No comments: