george.kroner at umuc.edu
Wed Nov 5 16:13:12 EST 2014
Hi all -
Apologies in advance that this is probably a n00b question, but I'm
struggling to think through the best way to do it.
Is it possible to have a SP behave such that if a user accesses a URL while
authenticated it displays or redirects in one way and if not authenticated
neither redirects to the login prompt nor error page but rather displays
something different or redirects to a different URL?
For example, accessing a URL like /webapp/whoami might return...
-> If authenticated, your username
-> If not authenticated the text "not logged in"
To extend this concept, accessing a URL like /webapp/classes might return...
-> If authenticated, a list of _my_ classes
-> If not authenticated, a list of all classes in the public catalog
(perhaps by redirecting to /webapp/classes/public but by neither
redirecting to a login prompt nor showing an error page)
We are thinking of extending this to a set of REST endpoints that would
allow authenticated users to see one thing but unauthenticated users to
experience a different behavior. (Some users will never have SSO accounts,
hence why we won't want to prompt everyone to login automatically.) While
I'd never implement it this way I'm hoping to avoid something resembling a
"send Ajax request, if HTTP 401/403 is returned do something else" pattern
Thank you, as always, for any advice.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users