javascript - ajax call to timed-out cas-protected server: ajax redirection problem -
our web server uses cas single sign on. cas server running jasig cas server on https://portal.ourdomain.com , web server running rails on http://service.ourdomain.com.
the rails server has session timeout set low single sign-out backup measure , other reasons. occasionally, users redirected portal.ourdomain.com reauthentication. seamless since portal.ourdomain.com redirects them service.ourdomain.com updated ticket cookie unless cas session has expired.
however, doesn't work ajax. web browsers not follow redirects xhr requests, if domain same.
one obvious solution serve https://ourdomain.com , stop subdomain nonsense. extensive operation , require serving through https.
another solution regularly ping server never times out. besides increased load on server, having pages never time out defeats purpose of having timeout in first place.
which leads third, crappy solution: remove timeout.
how overcome cross-domain issues ajax calls cas-protected resources? similar question unanswered, question appears broader, hope there's answer our question.
does have solutions problem don't suck?
you can wrap ajax xhr requestwhendoing revalidation, browser can understand redirect. need change code cas proxy. "work around must checked , extended (in worst case) every kind of ajax web framework. did jquery, gladly ajax base rails3.
Comments
Post a Comment