We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14467
    • 35 Posts
    I’m currently trying to CASify MODx, which hook should use for redirecting to the CAS login?
      • 14467
      • 35 Posts
      What I’m trying to do is to create a plugin so that MODx can use CAS (Central Authentication Service) (Single sign-on).
      I’m having some issues which I’m unable to fix without some input I guess... I’ve connected the CAS so that MODx user database serves as the master and I’ve overridden the /manager/ login so that it is redirected to CAS. So now I can log to the cms (manager) through CAS, but when I log out I can’t seem to force a redirect to CAS logout URI. When i log out from the cms, the mgr session is destroyed and all is good but as soon as I get to /manager/ CAS grants a service ticket for my user and I’m logged in again.

      I’m attaching the test files in case someone knows what I should do.
        • 17686
        • 5 Posts
        Hello Johan,

        did you succeed in getting modx to use CAS?


        Kenneth
          • 18409
          • 54 Posts
          I don’t think you should log people out of CAS when they logout of MODx. Depending on how other CAS applications they are using work, this could cause them to be logged out elsewhere which would be unexpected for them. I always have a "logout" link in my application which destroys their session for my application, and then has a link to the CAS logout with clear instructions that they need to log out of CAS as well. If they don’t log out of CAS as well, as you say, as soon as they return to my application it logs them back in again.

          Just my thoughts...!
            • 14467
            • 35 Posts
            Quote from: lundstro at Jan 15, 2011, 11:31 AM

            Hello Johan,

            did you succeed in getting modx to use CAS?


            Kenneth


            Yes, it works... The files I attached should work properly. It just need some tweeking...
              • 14467
              • 35 Posts
              Quote from: markvr at Jan 26, 2011, 02:23 PM

              I don’t think you should log people out of CAS when they logout of MODx. Depending on how other CAS applications they are using work, this could cause them to be logged out elsewhere which would be unexpected for them. I always have a "logout" link in my application which destroys their session for my application, and then has a link to the CAS logout with clear instructions that they need to log out of CAS as well. If they don’t log out of CAS as well, as you say, as soon as they return to my application it logs them back in again.

              Just my thoughts...!

              You are correct. It (MODx) shouldn’t log out of CAS (maybe however implemented as an optional feature, having MODx act as the master, like a portal). If I remember correctly the problem was the redirect when the user logs out of manager. When the user logs out of MODx, the plugin destroys the session, redirects to CAS (or optionally force logout) so the user have the option to log out from CAS. The redirect to CAS is the problem since it won’t redirect. It currently redirects to the manager login (even though I’m trying the overwrite that redirect). If that fix could be made it would be swell, otherwise it’s a basically a loop.
                • 37757
                • 1 Posts
                Hi everyone,
                @johansalllarsson : I'm very interested by your work, but I cannot download attached files can you update them or send me by pm ?
                thank you

                Gil