Return 401 on expired/missing session?
Peter Schober
peter.schober at univie.ac.at
Mon Apr 9 14:01:27 EDT 2018
For an application where the "frontend" is written in JavaScript and
running in the browser (accessing a server-based "backend" proteced
with mod_shib) we're having issues with the frontend code not being
able to detect that the Shib session has meanwhile expired:
All HTTP 30x codes returned are transparently followed by the JS code
(according to some XHR spec) and so far attempts at intercepting those
redirects in the JS framework used have failed.
Is there an easy way to have mod_shib (or httpd) return, say, HTTP 401
instead of a redirect to the IDP (or SAMLDS) in case where no valid
session exists?
Obviously that would leave people stuck but I guess we could let them
initiate a new session using the SP's Login handler (manually or in
this case via the "frontend" application that would detect this status
code and initate a new session automatically).
I feel I must be missing something obvious..
-peter
More information about the users
mailing list