Modular Separation and Tank Auth |
[eluser]Unknown[/eluser]
Dear all, Recently I finished my first project with CI. Now I'm looking at Modular Separation. And I want to use Tank Auth for logging in etc. I made a module auth where I put all the Tank Auth files. Not sure if this is correct. Plus I'm having troubles with the routing. The Tank Auth files direct without the module name. And so I get an error. Does anyone know a good tutorial or tips for implementing Tank Auth (or any other) with Modular Separation? I can't find it. Kind regards, Persoon [EDIT] Decided to use Ion-Auth. Currently trying to implement this. Not sure if I'm doing this correct. Since it takes me a lot of time. I tought CI and modules should save time. So, I must be doing something wrong.
[eluser]Nick_MyShuitings[/eluser]
I haven't used Modular Separation, but with Matchbox it was a walk in the park. I've used Matchbox both with DX_auth and with Tank_Auth in their own /auth/ module. If you give up on Modular Separation I could perhaps help if you use Matchbox. Regarding actually placing all of the tank auth files into the module... in my system the DX_Auth and Tank_Auth were kept in the normal library/model/config folders, and in my auth module I added the controller that actually handled the login and logout, registration functions etc. I don't know if that would matter in the routing, but it made more sense in my brain as far as separating the contributed code from my own personal code.
[eluser]Unknown[/eluser]
Nick, Thanks. I did manage to get it working. I also put the library in the regular folder and not in a module. But I put my auth.php not in an own module. I just added it to the admin module. So it does work, but I do have a problem. When I log out I get redirected to the login page. So far so good. But when I use the back-button I can see previous page. But as soon as I click on a link I get redirected again to the login. So I am logged out, but can see the last page before logout. Any ideas? Regards, Persoon
[eluser]Buso[/eluser]
The back button usually shows you a browser-cached page, so even if it doesn't exists or you do not have access to it, you will still be able to see it, but it's like an illusion Try going back and then hit F5 (reload)
[eluser]Nick_MyShuitings[/eluser]
[quote author="Buso" date="1283538729"]The back button usually shows you a browser-cached page[/quote] Agreed. You can try and play some games with the cache settings meta tags... if you want to be very specific then make sure that you are checking for the login in the constructor of the controller (or extend the controller to create something like ADMIN_Controller that will do all that for you). Check the following: http://php.net/manual/en/function.header.php Code: <?php Code: response.setHeader( "Pragma", "no-cache" ); Good luck, you're kinda in the hands of whether the browser wants to listen to your suggestions. |
Welcome Guest, Not a member yet? Register Sign In |