Re: Creating AuthComponent in 2.0-beta

2011-08-27 Thread Ben McClure
Brilliant, thanks for the tips, Perry! I have been trying to wrap my mind around how to make SAML authentication work through the Auth component, but just like I figured, I was thinking too hard about it when it turns out it's probably already set up just about properly :) I've already got an S

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread Perry
yes, that's what i mean, but if your returnUrl is not the default loginAction, you don't need to change the loginAction, just set the 'Auth.User' in session, and auth will check authorization for that page. On Sat, Aug 27, 2011 at 11:29 AM, Ben McClure wrote: > After re-reading, I think I unders

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread Ben McClure
After re-reading, I think I understand a little bit better: So my login method on the site should redirect to SimpleSAML for authentication, specifying whatever page the user was trying to access that required authentication ($this->referer() I suppose) as the ReturnURL, then in my AppControlle

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread Ben McClure
Perry, I don't know if I fully understand your reply, but it sounds like you might be onto something. I have already set the session name in both SimpleSAMLphp and CakePHP to be the same, and in my custom code in SimpleSAMLphp, I am already pulling the user record from the database with PDO:My

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread Perry
I think you don't need to change AuthComponent to work, in ReturnURL, you can verify the user with SAML, and then save the user in the session with name 'Auth.User', which is what AuthComponent will use for saving in session, and then set Auth->loginAction to false to prevent it from authenticate a

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread Ben McClure
Thanks, Mark! So what would best practice be if trying to utilize off-site authentication along with Cake's access control? I'm trying to build all Saml functionality into a plugin so that I can utilize it in my other applications, so while I'm still not sure what the best method is, I'm think

Re: Creating AuthComponent in 2.0-beta

2011-08-26 Thread mark_story
When the user returns from the SAML gateway, shouldn't you be able to then verify that the user exists? From the authenticate method, you can also manipulate the response and send additional headers/abort the request. The digest/basic auth classes do this. The original plan for authcomponent was

Creating AuthComponent in 2.0-beta

2011-08-25 Thread Ben McClure
I'm working on an Authentication module to work with the AuthComponent to log users in via SimpleSAMPphp (single sign-on via SAML) I understand how to create auth modules and have created one named SimpleSamlAuthenticate, but I am a bit stuck on implementing the authenticate(CakeRequest $reques