Results 1 to 4 of 4

Thread: CAS Check Authentication

  1. #1

    Default CAS Check Authentication

    I have 2 web apps, Site A and Site B. User goes to a secure page on Site A and is sent to CAS and successfully logs in and sees the secure page on Site A. Then the user goes to Site B. They are not authenticated under Site B yet so it just says "Hello Anonymous". They aren't authenticated until they try and hit a secure page under Site B. How can I check to see if they are authenticated when they get to Site B and perhaps auto authenticate them into Site B? Thanks!

  2. #2
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    134

    Default

    Would what you're trying to accomplish be better done by enabling CAS's Single Sign On functionality?
    Andrew Thompson - Linked In

  3. #3

    Default

    I am using CAS's single sign on functionality. When you hit a page in your app that requires authentication, it goes out to the CAS server and authenticates the user either by showing the login page (if the user isn't authenticated already in cas) or sends back the credentials right away (if the user is already authenticated in cas).

    So if I'm not authenticated in CAS yet and I visit Site A and access a secure page in Site A, I get tossed to the CAS login page. I login and get redirected back to Site A and everything is fine. Now I go to Site B. If I'm on a public non-secure page in Site B, it hasn't tried to see if I'm authenticated so it shows me as anonymous. But once I hit a secure page it authenticates me without having to go enter my login credentials again. I would like a method I can hit to just check to see if the current user is authenticated in CAS already or not. Does that exist?

  4. #4
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    134

    Default

    You can check if the current user is authenticated after the cas ticket goes to your webapp (through sso or not) - but not before. The reason being that you don't (and shouldn't) have access to the cas server's cookies.
    Andrew Thompson - Linked In

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •