<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16181</id>
	<title>Nabble - Zend Auth</title>
	<updated>2009-11-20T05:22:31Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Zend-Auth-f16181.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend-Auth-f16181.html" />
	<subtitle type="html">Zend &lt;a href=&quot;http://framework.zend.com/wiki/x/qBM&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Auth&lt;/a&gt;&amp;nbsp;- Authorization, Authentication, and Session related discussions</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26443194</id>
	<title>AW: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-20T05:22:31Z</published>
	<updated>2009-11-20T05:22:31Z</updated>
	<author>
		<name>Stefan Gehrig</name>
	</author>
	<content type="html">Hi Ondrej,
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the
&lt;br&gt;&amp;gt;&amp;gt; tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;&amp;gt;Good to know, thanks. I missed &amp;nbsp;this option when I browse source but
&lt;br&gt;&amp;gt;any way I have to fetch extra information from LDAP.
&lt;br&gt;&lt;br&gt;To fetch extra information from the LDAP you can either use the Zend_Auth_Adapter_Ldap::getAccountObject() method to retrieve the user account entry or you can use Zend_Auth_Adapter_Ldap::getLdap() to get the underlying LDAP adapter that allows you to query the LDAP (be careful as this adapter is authenticated with the credentials provided to the Zend_Auth_Adapter_Ldap which could result in some access restriction problems).
&lt;br&gt;&lt;br&gt;&amp;gt;I reckon that there is a some bad design in Zend_Amf authentication
&lt;br&gt;&amp;gt;but I have no idea what is wrong.
&lt;br&gt;&lt;br&gt;&amp;gt;Basically, I'm looking for clean way how to implement Ldap auth wit
&lt;br&gt;&amp;gt;Zend_Amf_Server. I could extend Zend_Amf_Auth_Abstract and use it as a
&lt;br&gt;&amp;gt;proxy to Zend_Auth_Adapter_Ldap...
&lt;br&gt;&lt;br&gt;A proxy seems to be the way to go. Create a My_Amf_Auth_LdapProxy (extends Zend_Amf_Auth_Abstract) and let it proxy your authentication request to the LDAP adapter:
&lt;br&gt;&lt;br&gt;class My_Amf_Auth_LdapProxy extends Zend_Amf_Auth_Abstract
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected $_ldapAdapter;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function __construct(Zend_Auth_Adapter_Ldap $ldapAdapter)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter = $ldapAdapter;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function setCredentials($username, $password) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parent::setCredentials($username, $password); // not really needed I think
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter-&amp;gt;setUsername($username);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter-&amp;gt;setPassword($password);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function authenticate()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;_ldapAdapter-&amp;gt;authenticate();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;That seems to be the most natural way accomplish your task.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Stefan
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26443194.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26442900</id>
	<title>Re: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-20T04:59:23Z</published>
	<updated>2009-11-20T04:59:23Z</updated>
	<author>
		<name>Ondrej Ivanič-3</name>
	</author>
	<content type="html">Hi Stefan,
&lt;br&gt;&lt;br&gt;2009/11/20 Stefan Gehrig &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442900&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gehrig@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the
&lt;br&gt;&amp;gt; tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;Good to know, thanks. I missed &amp;nbsp;this option when I browse source but
&lt;br&gt;any way I have to fetch extra information from LDAP.
&lt;br&gt;&lt;br&gt;I reckon that there is a some bad design in Zend_Amf authentication
&lt;br&gt;but I have no idea what is wrong.
&lt;br&gt;&lt;br&gt;Basically, I'm looking for clean way how to implement Ldap auth wit
&lt;br&gt;Zend_Amf_Server. I could extend Zend_Amf_Auth_Abstract and use it as a
&lt;br&gt;proxy to Zend_Auth_Adapter_Ldap...
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442900&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26442900.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26439435</id>
	<title>AW: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-19T23:34:13Z</published>
	<updated>2009-11-19T23:34:13Z</updated>
	<author>
		<name>Stefan Gehrig</name>
	</author>
	<content type="html">Dear Ondrej,
&lt;br&gt;&lt;br&gt;the problem is, that Zend_Auth_Adapter_Ldap in its default configuration tries to split the username at the @-sign to retrieve the username and the domain name. It hereby assumes that a username with an @-sign is a new Microsoft Windows domain username in the form username@domain (old form, prior to Windows Server 2003 I think, was DOMAIN\username).
&lt;br&gt;You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;$adapter = new Zend_Auth_Adapter_Ldap(array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; // ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'tryUsernameSplit' =&amp;gt; false
&lt;br&gt;), $username, $password);
&lt;br&gt;&lt;br&gt;That should do the trick.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Stefan
&lt;br&gt;&lt;br&gt;-----Ursprüngliche Nachricht-----
&lt;br&gt;Von: Ondrej Ivanič [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;] 
&lt;br&gt;Gesendet: Freitag, 20. November 2009 05:56
&lt;br&gt;An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-auth@...&lt;/a&gt;
&lt;br&gt;Betreff: [fw-auth] trouble with Zend_Auth_Adapter_Ldap
&lt;br&gt;&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;I had to implement Zend_Amf auth service against LDAP which seems like
&lt;br&gt;an easy task but it wasn't (maybe I missed something)
&lt;br&gt;&lt;br&gt;Zend_Amf_Server requires to use Zend_Amf_Auth_Abstract as a base class
&lt;br&gt;because abstract class provides additional method for settings
&lt;br&gt;credentials. Another surprise came with &amp;nbsp;Zend_Auth_Adapter_Ldap which
&lt;br&gt;doesn't like e-mail address as a uid. I always got error message
&lt;br&gt;'ondrej' not found (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej@...&lt;/a&gt;). We use following LDAP
&lt;br&gt;structure:
&lt;br&gt;dc=customers, dc=local (&amp;lt;- baseDn)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=ondrej@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user2@...&lt;/a&gt;
&lt;br&gt;and customers use (email, password) as credentials for login
&lt;br&gt;&lt;br&gt;Basically, I had to copy almost everything from
&lt;br&gt;Zend_Auth_Adapter_Ldap::authenticate() (it's not possible to extend
&lt;br&gt;because Zend_amf server requires Zend_Amf_Auth_Abstract as a base
&lt;br&gt;class) method and add few searches because I need associated user and
&lt;br&gt;company information.
&lt;br&gt;&lt;br&gt;Is there a better solution?
&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;-class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
&lt;br&gt;+class Amf_Auth_Ldap extends Zend_Amf_Auth_Abstract
&lt;br&gt;&lt;br&gt;@@ -275,15 +252,34 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$canonicalName = $ldap-&amp;gt;getCanonicalAccountName($username);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// bind with defualt credentials
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=inetorgperson)(uid=$username))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($user)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('User: One
&lt;br&gt;user expected; got ' . sizeof($user));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user = $user-&amp;gt;getFirst();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($user['dn'], $password);
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($canonicalName, $password);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = explode(',', $user['dn'], 3);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(isset($parentDn[1])) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = $parentDn[1];
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('Wrong LDAP
&lt;br&gt;structure; expected organisation as a parent' .
&lt;br&gt;sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=organizationalunit)($parentDn))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($organisation)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new
&lt;br&gt;Zend_Auth_Adapter_Exception('Organisation: One result expected; got '
&lt;br&gt;. sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation = $organisation-&amp;gt;getFirst();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[0] = '';
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[1] = '';
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$canonicalName authentication successful&amp;quot;;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$username authentication successful&amp;quot;;
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName,
&lt;br&gt;$messages);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, new
&lt;br&gt;FraudControl_UserInfo($user, $organisation), $messages);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Zend_Ldap_Exception $zle) {
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26439435.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26438387</id>
	<title>trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-19T20:55:51Z</published>
	<updated>2009-11-19T20:55:51Z</updated>
	<author>
		<name>Ondrej Ivanič-3</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;I had to implement Zend_Amf auth service against LDAP which seems like
&lt;br&gt;an easy task but it wasn't (maybe I missed something)
&lt;br&gt;&lt;br&gt;Zend_Amf_Server requires to use Zend_Amf_Auth_Abstract as a base class
&lt;br&gt;because abstract class provides additional method for settings
&lt;br&gt;credentials. Another surprise came with &amp;nbsp;Zend_Auth_Adapter_Ldap which
&lt;br&gt;doesn't like e-mail address as a uid. I always got error message
&lt;br&gt;'ondrej' not found (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej@...&lt;/a&gt;). We use following LDAP
&lt;br&gt;structure:
&lt;br&gt;dc=customers, dc=local (&amp;lt;- baseDn)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=ondrej@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user2@...&lt;/a&gt;
&lt;br&gt;and customers use (email, password) as credentials for login
&lt;br&gt;&lt;br&gt;Basically, I had to copy almost everything from
&lt;br&gt;Zend_Auth_Adapter_Ldap::authenticate() (it's not possible to extend
&lt;br&gt;because Zend_amf server requires Zend_Amf_Auth_Abstract as a base
&lt;br&gt;class) method and add few searches because I need associated user and
&lt;br&gt;company information.
&lt;br&gt;&lt;br&gt;Is there a better solution?
&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;-class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
&lt;br&gt;+class Amf_Auth_Ldap extends Zend_Amf_Auth_Abstract
&lt;br&gt;&lt;br&gt;@@ -275,15 +252,34 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$canonicalName = $ldap-&amp;gt;getCanonicalAccountName($username);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// bind with defualt credentials
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=inetorgperson)(uid=$username))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($user)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('User: One
&lt;br&gt;user expected; got ' . sizeof($user));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user = $user-&amp;gt;getFirst();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($user['dn'], $password);
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($canonicalName, $password);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = explode(',', $user['dn'], 3);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(isset($parentDn[1])) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = $parentDn[1];
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('Wrong LDAP
&lt;br&gt;structure; expected organisation as a parent' .
&lt;br&gt;sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=organizationalunit)($parentDn))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($organisation)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new
&lt;br&gt;Zend_Auth_Adapter_Exception('Organisation: One result expected; got '
&lt;br&gt;. sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation = $organisation-&amp;gt;getFirst();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[0] = '';
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[1] = '';
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$canonicalName authentication successful&amp;quot;;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$username authentication successful&amp;quot;;
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName,
&lt;br&gt;$messages);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, new
&lt;br&gt;FraudControl_UserInfo($user, $organisation), $messages);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Zend_Ldap_Exception $zle) {
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26438387.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26388209</id>
	<title>Re: help with GET method</title>
	<published>2009-11-17T03:18:26Z</published>
	<updated>2009-11-17T03:18:26Z</updated>
	<author>
		<name>Joó Ádám</name>
	</author>
	<content type="html">You can do that by calling
&lt;br&gt;&lt;a href=&quot;http://mysite.com/images/list/typeid/2/authorid/4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/images/list/typeid/2/authorid/4&lt;/a&gt;&amp;nbsp;and writing the
&lt;br&gt;appropriate controller code, of course. This assumes you use the
&lt;br&gt;default router, however, I recommend you to define your own paths, in
&lt;br&gt;this case I would use /images?type=2&amp;author=4 instead.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Ádám
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/help-with-GET-method-tp26382390p26388209.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26382390</id>
	<title>help with GET method</title>
	<published>2009-11-16T16:27:27Z</published>
	<updated>2009-11-16T16:27:27Z</updated>
	<author>
		<name>Nguyễn Thanh Tiến</name>
	</author>
	<content type="html">I&amp;#39;m new in ZF, i have a problem: &lt;br&gt;
if i want to create a get method in ZF, maybe it looks like :&lt;br&gt;
assumption: images(id,typeid,imgPath,Authorid) (in database)&lt;br&gt;
&lt;div style=&quot;margin: 5px 20px 20px;&quot;&gt;
	&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;Code:&lt;/div&gt;
	&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot; style=&quot;border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;&quot;&gt;&lt;a href=&quot;http://mysite.com/images/list/typeid/2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mysite.com/images/list/typeid/2&lt;/a&gt;&lt;/pre&gt;


&lt;/div&gt;It means i want to list all images which have typeid=2&lt;br&gt;
&lt;br&gt;
but now i want to list all images have typeid=2 and authorid =4 by using GET method. how can i make it?&lt;br&gt;
Thanks in advance
		&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Nguyễn Thanh Tiến&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/help-with-GET-method-tp26382390p26382390.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294182</id>
	<title>view object</title>
	<published>2009-11-10T16:47:34Z</published>
	<updated>2009-11-10T16:47:34Z</updated>
	<author>
		<name>Roozbeh Matloobi</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;I cannot undrestand that the vlaue of view in controller is different 
&lt;br&gt;form view/script.
&lt;br&gt;to make it clear. when I am returning $this-&amp;gt;view in the controller I 
&lt;br&gt;have some missing arguments compare to return $this in view/script. 
&lt;br&gt;forexample:
&lt;br&gt;the $this-&amp;gt;view in controller:
&lt;br&gt;.
&lt;br&gt;.
&lt;br&gt;.
&lt;br&gt;.[&amp;quot;_path&amp;quot;:&amp;quot;Zend_View_Abstract&amp;quot;:private] =&amp;gt; array(3) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;script&amp;quot;] =&amp;gt; array(1) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [0] =&amp;gt; string(71) &amp;quot;C:\roozbeh\repo\newskool\repo\application\modules\client\views\scripts\&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;helper&amp;quot;] =&amp;gt; array(0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;filter&amp;quot;] =&amp;gt; array(0) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;the value of $this in view/script.
&lt;br&gt;&lt;br&gt;[&amp;quot;_path&amp;quot;:&amp;quot;Zend_View_Abstract&amp;quot;:private] =&amp;gt; array(3) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;script&amp;quot;] =&amp;gt; array(3) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [0] =&amp;gt; string(63) &amp;quot;C:\roozbeh\repo\newskool\repo\application\views\scripts\client\&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [1] =&amp;gt; string(56) &amp;quot;C:\roozbeh\repo\newskool\repo\application\views\scripts\&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [2] =&amp;gt; string(71) &amp;quot;C:\roozbeh\repo\newskool\repo\application\modules\client\views\scripts\&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;helper&amp;quot;] =&amp;gt; array(0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; [&amp;quot;filter&amp;quot;] =&amp;gt; array(0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;could you please let me know how can i have 
&lt;br&gt;[0] =&amp;gt; string(63) &amp;quot;C:\roozbeh\repo\newskool\repo\application\views\scripts\client\&amp;quot;
&lt;br&gt;[1] =&amp;gt; string(56) &amp;quot;C:\roozbeh\repo\newskool\repo\application\views\scripts\&amp;quot;
&lt;br&gt;&lt;br&gt;in conroller so by running $this-&amp;gt;view in controller I can have above values.
&lt;br&gt;much appriciate for any help. 
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Roozbeh
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/view-object-tp26294182p26294182.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278229</id>
	<title>Re: What is the Session object member in Zend_Auth_Storage_Session?</title>
	<published>2009-11-09T20:45:36Z</published>
	<updated>2009-11-09T20:45:36Z</updated>
	<author>
		<name>ronnystalker</name>
	</author>
	<content type="html">yes. very helpful thanks.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;ronnystalker wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi
&lt;br&gt;I am just looking into the code of Zend_Auth_Storage_Session for ideas on how i can extend it to customise my own class. 
&lt;br&gt;&lt;br&gt;I see there is a property called $_member : 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Session object member
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @var mixed
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected $_member;
&lt;br&gt;&lt;br&gt;The Doc description is a little bit vague.
&lt;br&gt;&lt;br&gt;Is this referring to a member in the sense of a 'user' who is a member of the site?
&lt;br&gt;OR
&lt;br&gt;Is this referring to a member in the sense of the class member/property name of the variable that holds the session object?
&lt;br&gt;&lt;br&gt;I will probably discover the answer soon enough through more research. 
&lt;br&gt;&lt;br&gt;However, it might be nice to explicitly have the answer to this question available 'on the web' somewhere to make code analysis quicker for those who are following my path.
&lt;br&gt;&lt;br&gt;Any way - i hope to reply to this when i find out more about this.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-is-the-Session-object-member-in-Zend_Auth_Storage_Session--tp26243400p26278229.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267499</id>
	<title>Re: Zend_Acl , Ownership - request scope or injection in domain objects</title>
	<published>2009-11-09T06:38:42Z</published>
	<updated>2009-11-09T06:38:42Z</updated>
	<author>
		<name>Ralph Schindler-2</name>
	</author>
	<content type="html">vd,
&lt;br&gt;&lt;br&gt;I am not sure what you are basing this on. &amp;nbsp;Out of the box, Zend_Acl 
&lt;br&gt;does not dictate how you use ACL: with a static definition, or even with 
&lt;br&gt;a dynamic definition one might read out of a database.
&lt;br&gt;&lt;br&gt;In general, Zend_Acl is probably one of the lightest components because 
&lt;br&gt;it no coupling with other components and only effectively has 2 jobs:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;a) to give you the proper interfaces to identify which objects are 
&lt;br&gt;roles and resoures, and
&lt;br&gt;&amp;nbsp; &amp;nbsp;b) to give you a minimal set of functionality to be able to determine 
&lt;br&gt;if according to the rules it were given, does some role have access to 
&lt;br&gt;some resource.
&lt;br&gt;&lt;br&gt;If you are finding that Zend_Acl is too slow, chances are it's not the 
&lt;br&gt;actual component, rather the implementation that is suspect number one.
&lt;br&gt;&lt;br&gt;-ralph
&lt;br&gt;&lt;br&gt;&amp;gt; reading from the disk. I dont think using ACL for high traffic site is a 
&lt;br&gt;&amp;gt; good option. Looking at ZF's slow performance using ACL will act as 
&lt;br&gt;&amp;gt; icing on cake. Correct me if I am wrong and this reply is not to prove 
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26267499.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267373</id>
	<title>Re: What is the Session object member in Zend_Auth_Storage_Session?</title>
	<published>2009-11-09T06:30:57Z</published>
	<updated>2009-11-09T06:30:57Z</updated>
	<author>
		<name>Ralph Schindler-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;$_member is the actual variable name that will be stored inside the 
&lt;br&gt;Zend_Session_Namespace object.
&lt;br&gt;&lt;br&gt;Think of it like this, if the namespace is called by 'Zend_Auth', the 
&lt;br&gt;default, and the member is called by 'storage', by default; it would 
&lt;br&gt;effectively map to this in memory:
&lt;br&gt;&lt;br&gt;$_SESSION['Zend_Auth']['storage'] = $valueOfIdentityHere;
&lt;br&gt;&lt;br&gt;Hope this helps,
&lt;br&gt;Ralph
&lt;br&gt;&lt;br&gt;ronnystalker wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; I am just looking into the code of Zend_Auth_Storage_Session for ideas on
&lt;br&gt;&amp;gt; how i can extend it to customise my own class. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I see there is a property called $_member : 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Session object member
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @var mixed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected $_member;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The Doc description is a little bit vague.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is this referring to a member in the sense of a 'user' who is a member of
&lt;br&gt;&amp;gt; the site?
&lt;br&gt;&amp;gt; OR
&lt;br&gt;&amp;gt; Is this referring to a member in the sense of the class member/property name
&lt;br&gt;&amp;gt; of the variable that holds the session object?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I will probably discover the answer soon enough through more research. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, it might be nice to explicitly have the answer to this question
&lt;br&gt;&amp;gt; available 'on the web' somewhere to make code analysis quicker for those who
&lt;br&gt;&amp;gt; are following my path.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any way - i hope to reply to this when i find out more about this.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-is-the-Session-object-member-in-Zend_Auth_Storage_Session--tp26243400p26267373.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26243400</id>
	<title>What is the Session object member in Zend_Auth_Storage_Session?</title>
	<published>2009-11-07T08:57:51Z</published>
	<updated>2009-11-07T08:57:51Z</updated>
	<author>
		<name>ronnystalker</name>
	</author>
	<content type="html">Hi
&lt;br&gt;I am just looking into the code of Zend_Auth_Storage_Session for ideas on how i can extend it to customise my own class. 
&lt;br&gt;&lt;br&gt;I see there is a property called $_member : 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Session object member
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @var mixed
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected $_member;
&lt;br&gt;&lt;br&gt;The Doc description is a little bit vague.
&lt;br&gt;&lt;br&gt;Is this referring to a member in the sense of a 'user' who is a member of the site?
&lt;br&gt;OR
&lt;br&gt;Is this referring to a member in the sense of the class member/property name of the variable that holds the session object?
&lt;br&gt;&lt;br&gt;I will probably discover the answer soon enough through more research. 
&lt;br&gt;&lt;br&gt;However, it might be nice to explicitly have the answer to this question available 'on the web' somewhere to make code analysis quicker for those who are following my path.
&lt;br&gt;&lt;br&gt;Any way - i hope to reply to this when i find out more about this.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What-is-the-Session-object-member-in-Zend_Auth_Storage_Session--tp26243400p26243400.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26209110</id>
	<title>Re: Zend_Acl , Ownership - request scope or injection in  domain objects</title>
	<published>2009-11-04T20:26:51Z</published>
	<updated>2009-11-04T20:26:51Z</updated>
	<author>
		<name>vd-3</name>
	</author>
	<content type="html">Where are you going to store the ACL - in a file most probably then isnt&amp;#39;t going to slow down the application in event of high traffic i.e reading from the disk. I dont think using ACL for high traffic site is a good option. Looking at ZF&amp;#39;s slow performance using ACL will act as icing on cake. Correct me if I am wrong and this reply is not to prove that what you&amp;#39;re doing is wrong. Just sharing my thoughts.&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 30, 2009 at 10:23 PM, Abraham Block &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209110&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atblock@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
A lot of people (me included), like to have their domain entities implement the ACL Role interface, and then have the ACL check directly against the domain entities in question. You can do this in a service layer, or perhaps with some kind of event system.&lt;div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 30, 2009 at 12:37 PM, tomascejka &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209110&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dis.cejkatomas@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;br&gt;
Hi,&lt;br&gt;
&lt;br&gt;
I stand before implementing authorization/ownership in ZF based application.&lt;br&gt;
I am developer but now I ask you as developer and architect in one person. I&lt;br&gt;
would like to know how to design authorization process. After I read some&lt;br&gt;
sources - there are two articles which interest me.&lt;br&gt;
&lt;br&gt;
A.&lt;br&gt;
&lt;a href=&quot;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&lt;/a&gt;&lt;br&gt;
B.&lt;br&gt;
&lt;a href=&quot;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Where is good location to check rights and ownership?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-----&lt;br&gt;
Enviroment&lt;br&gt;
==========&lt;br&gt;
&lt;br&gt;
OS:&lt;br&gt;
SUSE Linux Enterprice 10 (i586) - version 2.6.16.60-0.27-smp&lt;br&gt;
Windows XP SP 3&lt;br&gt;
&lt;br&gt;
Tomcat v6.0.16, 6.0.18&lt;br&gt;
Java(TM) SE Runtime Enviroment (build 1.6.0-b105)&lt;br&gt;
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)&lt;br&gt;
Maven v2.0.9&lt;br&gt;
Apache 2.2.11&lt;br&gt;
MySQL 5.1.30&lt;br&gt;
PHP 5.2.10&lt;br&gt;
qooxdoo-0.8.2&lt;br&gt;
Python 2.5&lt;br&gt;
Zend framework 1.9.3&lt;br&gt;
Dojo 1.3.2&lt;br&gt;
&lt;br&gt;
Hudson:&lt;br&gt;
=======&lt;br&gt;
version 1.329&lt;br&gt;
plugins: Maven 1.304, SSH Slaves&lt;br&gt;
running: deployed in Tomcat&lt;br&gt;
&lt;br&gt;
front-end developer web-based application&lt;br&gt;
A.S.E.I. [&lt;a href=&quot;http://www.asei.cz&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.asei.cz&lt;/a&gt;]&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133244.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133244.html&lt;/a&gt;&lt;br&gt;


Sent from the Zend Auth mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26209110.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133468</id>
	<title>Re: Zend_Acl , Ownership - request scope or injection in  domain objects</title>
	<published>2009-10-30T09:53:09Z</published>
	<updated>2009-10-30T09:53:09Z</updated>
	<author>
		<name>Avi Block</name>
	</author>
	<content type="html">A lot of people (me included), like to have their domain entities implement the ACL Role interface, and then have the ACL check directly against the domain entities in question. You can do this in a service layer, or perhaps with some kind of event system.&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 30, 2009 at 12:37 PM, tomascejka &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133468&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dis.cejkatomas@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
&lt;br&gt;
Hi,&lt;br&gt;
&lt;br&gt;
I stand before implementing authorization/ownership in ZF based application.&lt;br&gt;
I am developer but now I ask you as developer and architect in one person. I&lt;br&gt;
would like to know how to design authorization process. After I read some&lt;br&gt;
sources - there are two articles which interest me.&lt;br&gt;
&lt;br&gt;
A.&lt;br&gt;
&lt;a href=&quot;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&lt;/a&gt;&lt;br&gt;
B.&lt;br&gt;
&lt;a href=&quot;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Where is good location to check rights and ownership?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-----&lt;br&gt;
Enviroment&lt;br&gt;
==========&lt;br&gt;
&lt;br&gt;
OS:&lt;br&gt;
SUSE Linux Enterprice 10 (i586) - version 2.6.16.60-0.27-smp&lt;br&gt;
Windows XP SP 3&lt;br&gt;
&lt;br&gt;
Tomcat v6.0.16, 6.0.18&lt;br&gt;
Java(TM) SE Runtime Enviroment (build 1.6.0-b105)&lt;br&gt;
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)&lt;br&gt;
Maven v2.0.9&lt;br&gt;
Apache 2.2.11&lt;br&gt;
MySQL 5.1.30&lt;br&gt;
PHP 5.2.10&lt;br&gt;
qooxdoo-0.8.2&lt;br&gt;
Python 2.5&lt;br&gt;
Zend framework 1.9.3&lt;br&gt;
Dojo 1.3.2&lt;br&gt;
&lt;br&gt;
Hudson:&lt;br&gt;
=======&lt;br&gt;
version 1.329&lt;br&gt;
plugins: Maven 1.304, SSH Slaves&lt;br&gt;
running: deployed in Tomcat&lt;br&gt;
&lt;br&gt;
front-end developer web-based application&lt;br&gt;
A.S.E.I. [&lt;a href=&quot;http://www.asei.cz&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.asei.cz&lt;/a&gt;]&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133244.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133244.html&lt;/a&gt;&lt;br&gt;

Sent from the Zend Auth mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133468.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133244</id>
	<title>Zend_Acl , Ownership - request scope or injection in domain objects</title>
	<published>2009-10-30T09:37:12Z</published>
	<updated>2009-10-30T09:37:12Z</updated>
	<author>
		<name>tomascejka</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I stand before implementing authorization/ownership in ZF based application. &amp;nbsp;I am developer but now I ask you as developer and architect in one person. I would like to know how to design authorization process. After I read some sources - there are two articles which interest me.
&lt;br&gt;&lt;br&gt;A. &lt;a href=&quot;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use&lt;/a&gt;&lt;br&gt;B. &lt;a href=&quot;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.weierophinney.net/matthew/archives/201-Applying-ACLs-to-Models.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Where is good location to check rights and ownership?
&lt;br&gt;&lt;br&gt;I suppose that interconnecting domain with acl is not good, but there is a something what I do not see...
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Enviroment
&lt;br&gt;==========
&lt;br&gt;&lt;br&gt;OS:
&lt;br&gt;SUSE Linux Enterprice 10 (i586) - version 2.6.16.60-0.27-smp
&lt;br&gt;Windows XP SP 3
&lt;br&gt;&lt;br&gt;Tomcat v6.0.16, 6.0.18
&lt;br&gt;Java(TM) SE Runtime Enviroment (build 1.6.0-b105)
&lt;br&gt;Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
&lt;br&gt;Maven v2.0.9
&lt;br&gt;Apache 2.2.11
&lt;br&gt;MySQL 5.1.30
&lt;br&gt;PHP 5.2.10
&lt;br&gt;qooxdoo-0.8.2
&lt;br&gt;Python 2.5
&lt;br&gt;Zend framework 1.9.3
&lt;br&gt;Dojo 1.3.2
&lt;br&gt;&lt;br&gt;Hudson:
&lt;br&gt;=======
&lt;br&gt;version 1.329
&lt;br&gt;plugins: Maven 1.304, SSH Slaves
&lt;br&gt;running: deployed in Tomcat
&lt;br&gt;&lt;br&gt;front-end developer web-based application
&lt;br&gt;A.S.E.I. [&lt;a href=&quot;http://www.asei.cz&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.asei.cz&lt;/a&gt;]&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-%2C-Ownership---request-scope-or-injection-in-domain-objects-tp26133244p26133244.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25927280</id>
	<title>Re: Zend_Session::rememberMe() not working or not  implemented correctly.</title>
	<published>2009-10-16T08:26:54Z</published>
	<updated>2009-10-16T08:26:54Z</updated>
	<author>
		<name>kwylez</name>
	</author>
	<content type="html">Use the following to handle the &amp;quot;remember me&amp;quot; functionality:&lt;br&gt;&lt;br&gt;            if ($this-&amp;gt;_hasParam(&amp;#39;rememberme&amp;#39;) &amp;amp;&amp;amp; $this-&amp;gt;_getParam(&amp;#39;rememberme&amp;#39;)) {&lt;br&gt;                &lt;br&gt;            /**&lt;br&gt;
                  * &amp;#39;remeberMe&amp;#39; setting is defined it the global config&lt;br&gt;                  */&lt;br&gt;                Zend_Session::rememberMe();&lt;br&gt;                &lt;br&gt;            $saveHandler = Zend_Session::getSaveHandler();&lt;br&gt;
            $saveHandler-&amp;gt;setLifetime($this-&amp;gt;_globalConfig-&amp;gt;session-&amp;gt;params-&amp;gt;remember_me_seconds)&lt;br&gt;                        -&amp;gt;setOverrideLifetime(true);&lt;br&gt;                &lt;br&gt;            }&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;
On Fri, Oct 16, 2009 at 9:36 AM, bmuse &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25927280&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brian.muse@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;br&gt;
I&amp;#39;m trying to keep my users logged in for a month. Currently I&amp;#39;m calling&lt;br&gt;
Zend_Session::start();&lt;br&gt;
in my bootstrap.&lt;br&gt;
&lt;br&gt;
In my login controller I have:&lt;br&gt;
Zend_Session::rememberMe(60*60*24*7*4);&lt;br&gt;
&lt;br&gt;
However, I&amp;#39;m only logged in in the current tab or window and the session&lt;br&gt;
seems to expire after an hour or so.&lt;br&gt;
&lt;br&gt;
Any advice on the proper way to set this up would be greatly appreciated.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://www.nabble.com/Zend_Session%3A%3ArememberMe%28%29-not-working-or-not-implemented-correctly.-tp25926465p25926465.html&quot; target=&quot;_blank&quot;&gt;http://www.nabble.com/Zend_Session%3A%3ArememberMe%28%29-not-working-or-not-implemented-correctly.-tp25926465p25926465.html&lt;/a&gt;&lt;br&gt;

Sent from the Zend Auth mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Cory Wiles&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25927280&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kwylez@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.corywiles.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.corywiles.com/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.randomthoughtprocess.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.randomthoughtprocess.com/&lt;/a&gt;&lt;br&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Session%3A%3ArememberMe%28%29-not-working-or-not-implemented-correctly.-tp25926465p25927280.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25926465</id>
	<title>Zend_Session::rememberMe() not working or not implemented correctly.</title>
	<published>2009-10-16T07:36:15Z</published>
	<updated>2009-10-16T07:36:15Z</updated>
	<author>
		<name>bmuse</name>
	</author>
	<content type="html">I'm trying to keep my users logged in for a month. Currently I'm calling
&lt;br&gt;Zend_Session::start();
&lt;br&gt;in my bootstrap.
&lt;br&gt;&lt;br&gt;In my login controller I have:
&lt;br&gt;Zend_Session::rememberMe(60*60*24*7*4);
&lt;br&gt;&lt;br&gt;However, I'm only logged in in the current tab or window and the session seems to expire after an hour or so.
&lt;br&gt;&lt;br&gt;Any advice on the proper way to set this up would be greatly appreciated. </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Session%3A%3ArememberMe%28%29-not-working-or-not-implemented-correctly.-tp25926465p25926465.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25771184</id>
	<title>Re: Most Wanted: Zend_Acl Issues</title>
	<published>2009-10-06T08:39:46Z</published>
	<updated>2009-10-06T08:39:46Z</updated>
	<author>
		<name>ajlozier</name>
	</author>
	<content type="html">Hi Ralph,
&lt;br&gt;&lt;br&gt;I am interested in contributing to the Zend_Acl component. &amp;nbsp;I am emailing my contributor agreement as we speak. &amp;nbsp;I recently submitted an issue report on this component as well as a proposed fix. &amp;nbsp;I'd like to formally submit this patch as well as tackle some of the issues you mention below. &amp;nbsp;Right now I am particularly interested in adding more query methods, to get defined resources, roles, privileges.
&lt;br&gt;&lt;br&gt;Aaron
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Ralph Schindler-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello everyone,
&lt;br&gt;&lt;br&gt;With the new states added to Zend Framework issues tracker, I have 
&lt;br&gt;pruned and triaged Zend_Acl's issues. &amp;nbsp;You can tell them by the icon 
&lt;br&gt;that looks like this:
&lt;br&gt;&lt;br&gt;[I]
&lt;br&gt;&lt;br&gt;in the link below:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://framework.zend.com/issues/secure/IssueNavigator.jspa?resolution=-1&amp;component=10070&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/issues/secure/IssueNavigator.jspa?resolution=-1&amp;component=10070&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;There are several issues listed (about 7) that sound like reasonable 
&lt;br&gt;requests or need further exploration, but are outside the scope of the 
&lt;br&gt;ZF Dev Team to work on.
&lt;br&gt;&lt;br&gt;If anyone would like to take them on, please let me know and we can work 
&lt;br&gt;together on a resolution.
&lt;br&gt;&lt;br&gt;Some of them include:
&lt;br&gt;&lt;br&gt;* Zend_Acl::Zend_Acl_Resource - equal childs for different parents
&lt;br&gt;* Add methods to get defined roles, resources, rules
&lt;br&gt;* Allow roles to be entered in array format in isAllowed
&lt;br&gt;* Database Driven ACL
&lt;br&gt;* add method to get parent resource and methods get all parents of roles 
&lt;br&gt;or resources
&lt;br&gt;* Support adding parent(s) to existing Role
&lt;br&gt;* Zend_Acl : debug for inheritance of rules : get source from used rule
&lt;br&gt;&lt;br&gt;While I encourage anyone to take what they find interesting, you can 
&lt;br&gt;also see what might be higher priority by looking at the votes column to 
&lt;br&gt;see how many people would be waiting on such a feature.
&lt;br&gt;&lt;br&gt;I'll be in #zftalk.dev, or reply to this thread if you'd like to take 
&lt;br&gt;something on.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;-ralph
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Most-Wanted%3A-Zend_Acl-Issues-tp25454637p25771184.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25681880</id>
	<title>Re: a couple questions about customizing Zend_Auth</title>
	<published>2009-09-30T07:12:40Z</published>
	<updated>2009-09-30T07:12:40Z</updated>
	<author>
		<name>David Mintz-3</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Sep 29, 2009 at 2:04 PM, Ralph Schindler &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25681880&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralph.schindler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
used getDbSelect() to get the select and join() a table, and could not &lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
This is a bug in Zend_Db_Select. Currently, calling join before from&lt;br&gt;
causes odd SQL to be produced.  It seems like fixing this issue:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://framework.zend.com/issues/browse/ZF-6653&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/issues/browse/ZF-6653&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
will probably solve yours.  I have this slated for an upcoming release.&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;Interesting, and not entirely surprising. Most people probably think of building their SQL from left to right, so the join() before from() would be an unusual case that you can easily forgive developers for not anticipating.&lt;br&gt;
&lt;br&gt;&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;br&gt;
and kept getting Zend_Auth_Adapter_Exception, invalid SQL statement.&lt;br&gt;
&lt;br&gt;
In any event, I gave up on this approach and am now extending Zend_Auth_Adapter_DbTable and overriding authenticate(). Is this a reasonable solution?&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
This is a very reasonable solution, in fact, it was designed for.  You&lt;br&gt;
can see that since there are several small succinct methods that you can&lt;br&gt;
override in Zend_Auth_Adapter_DbTable.&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;I extended Zend_Auth_Adapter_DbTable and implemented my own authenticate(), leveraging a couple of protected methods from the parent, stealing whoever&amp;#39;s clever snippet that builds the boolean &amp;#39;zend_auth_credential_match&amp;#39; expression, and adding the stuff I needed, e.g, a rather tortured SQL query because of my weird database structure, and a database update to set the users last_login timestamp. Works great.&lt;br&gt;
&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;
&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Which brings me to the next question:  suppose you want to add an authentication failure code that means &amp;#39;account disabled.&amp;#39;  Extend Zend_Auth_Result and have your authenticate return an instance of it?&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
It sounds like you want to build an Auth model, and inside that model,&lt;br&gt;
extends Zend_Auth_Adapter_DbTable to detect this situation.  I would&lt;br&gt;
return the standard failure constant, but also add the message that you&lt;br&gt;
feel you might want to use as the failure message.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;Well, yeah -- if I understand correctly, that&amp;#39;s what I&amp;#39;ve done. &lt;br&gt;&lt;br&gt;Model_AuthAdapter extends  Zend_Auth_Adapter_DbTable&lt;br&gt;{&lt;br&gt;
&lt;br&gt;const FAILURE_ACCOUNT_DISABLED = &amp;#39;Account disabled.&amp;#39;;&lt;br&gt;&lt;br&gt;function authenticate() {&lt;br&gt;       &lt;br&gt;        $this-&amp;gt;_authenticateResultInfo[&amp;#39;identity&amp;#39;] = $this-&amp;gt;_identity;&lt;br&gt;         // stolen from parent &lt;br&gt;
        if (empty($this-&amp;gt;_credentialTreatment) || (strpos($this-&amp;gt;_credentialTreatment, &amp;#39;?&amp;#39;) === false)) {&lt;br&gt;            $this-&amp;gt;_credentialTreatment = &amp;#39;?&amp;#39;;&lt;br&gt;        }&lt;br&gt;        $credentialExpression = new Zend_Db_Expr(&lt;br&gt;
            &amp;#39;(CASE WHEN &amp;#39; .&lt;br&gt;            $this-&amp;gt;_zendDb-&amp;gt;quoteInto(&lt;br&gt;                $this-&amp;gt;_zendDb-&amp;gt;quoteIdentifier($this-&amp;gt;_credentialColumn, true)&lt;br&gt;                . &amp;#39; = &amp;#39; . $this-&amp;gt;_credentialTreatment, $this-&amp;gt;_credential&lt;br&gt;
                )&lt;br&gt;            . &amp;#39; THEN 1 ELSE 0 END) AS &amp;#39;&lt;br&gt;            . $this-&amp;gt;_zendDb-&amp;gt;quoteIdentifier(&amp;#39;zend_auth_credential_match&amp;#39;)&lt;br&gt;            );&lt;br&gt;        // end stolen part&lt;br&gt;        if ($this-&amp;gt;_identityColumn == &amp;#39;username&amp;#39;) {&lt;br&gt;
            $identityColumn = &amp;#39;users.username&amp;#39;;&lt;br&gt;        } elseif ($this-&amp;gt;_identityColumn == &amp;#39;email&amp;#39;) {&lt;br&gt;            $identityColumn = &amp;#39;people.email&amp;#39;; &lt;br&gt;        } else {&lt;br&gt;            throw new Exception(&amp;#39;invalid identity column: &amp;#39;.$this-&amp;gt;_identityColumn);&lt;br&gt;
        }&lt;br&gt;        $select = $this-&amp;gt;_zendDb-&amp;gt;select();&lt;br&gt;        $select&lt;br&gt;            -&amp;gt;from($this-&amp;gt;_tableName, array(&amp;#39;username&amp;#39;,&amp;#39;group_id&amp;#39;,&amp;#39;active&amp;#39;,&amp;#39;last_login&amp;#39;, $credentialExpression))&lt;br&gt;
            -&amp;gt;join(&amp;#39;groups&amp;#39;,&amp;#39;users.group_id = &lt;a href=&quot;http://groups.id&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;groups.id&lt;/a&gt;&amp;#39;,array(&amp;#39;group&amp;#39;=&amp;gt;&amp;#39;&lt;a href=&quot;http://groups.name&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;groups.name&lt;/a&gt;&amp;#39;))&lt;br&gt;            -&amp;gt;join(&amp;#39;people&amp;#39;,&amp;#39;users.person_id = &lt;a href=&quot;http://people.id&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;people.id&lt;/a&gt;&amp;#39;,array(&amp;#39;id&amp;#39;,&amp;#39;lastname&amp;#39;,&amp;#39;firstname&amp;#39;,&amp;#39;email&amp;#39;))&lt;br&gt;
            -&amp;gt;join(&amp;#39;person_types&amp;#39;,&amp;#39;people.person_type_id = &lt;a href=&quot;http://person_types.id&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;person_types.id&lt;/a&gt;&amp;#39;,array(&amp;#39;person_type&amp;#39;=&amp;gt;&amp;#39;flavor&amp;#39;))&lt;br&gt;            -&amp;gt;where(&amp;quot;$identityColumn = ? &amp;quot;,$this-&amp;gt;_identity) ;&lt;br&gt;
       &lt;br&gt;        $this-&amp;gt;_zendDb-&amp;gt;setFetchMode(Zend_Db::FETCH_OBJ);&lt;br&gt;        $results = $this-&amp;gt;_zendDb-&amp;gt;fetchAll($select);&lt;br&gt;        // borrowed from parent&lt;br&gt;        if ( ($authResult = $this-&amp;gt;_authenticateValidateResultset($results)) instanceof Zend_Auth_Result) {&lt;br&gt;
            return $authResult;&lt;br&gt;        }&lt;br&gt;        $user = array_shift($results); &lt;br&gt;        $authResult = $this-&amp;gt;_authenticateValidateResult((array)$user);&lt;br&gt;        // if everything is good so far, make sure account is active&lt;br&gt;
        if ($authResult-&amp;gt;isValid()) {&lt;br&gt;            if (! $user-&amp;gt;active) {&lt;br&gt;                return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED,&lt;br&gt;                    $this-&amp;gt;_identity,array(self::FAILURE_ACCOUNT_DISABLED));&lt;br&gt;
            } &lt;br&gt;        }&lt;br&gt;        $this-&amp;gt;_zendDb-&amp;gt;update(&amp;#39;users&amp;#39;,   array(&amp;#39;last_login&amp;#39; =&amp;gt; time()),           $this-&amp;gt;_zendDb-&amp;gt;quoteInto( &amp;#39;person_id = ?&amp;#39;, $user-&amp;gt;id ) );&lt;br&gt;         return $authResult;&lt;br&gt;
    }&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;Thank you Ralph. &lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;-- &lt;br&gt;David Mintz&lt;br&gt;&lt;a href=&quot;http://davidmintz.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davidmintz.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;The subtle source is clear and bright&lt;br&gt;The tributary streams flow through the darkness&lt;br&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/a-couple-questions-about-customizing-Zend_Auth-tp25598418p25681880.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25668019</id>
	<title>Re: a couple questions about customizing Zend_Auth</title>
	<published>2009-09-29T11:04:26Z</published>
	<updated>2009-09-29T11:04:26Z</updated>
	<author>
		<name>Ralph Schindler-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;gt; used getDbSelect() to get the select and join() a table, and could not 
&lt;br&gt;&lt;br&gt;This is a bug in Zend_Db_Select. Currently, calling join before from
&lt;br&gt;causes odd SQL to be produced. &amp;nbsp;It seems like fixing this issue:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://framework.zend.com/issues/browse/ZF-6653&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/issues/browse/ZF-6653&lt;/a&gt;&lt;br&gt;&lt;br&gt;will probably solve yours. &amp;nbsp;I have this slated for an upcoming release.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and kept getting Zend_Auth_Adapter_Exception, invalid SQL statement.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In any event, I gave up on this approach and am now extending 
&lt;br&gt;&amp;gt; Zend_Auth_Adapter_DbTable and overriding authenticate(). Is this a 
&lt;br&gt;&amp;gt; reasonable solution?
&lt;br&gt;&lt;br&gt;This is a very reasonable solution, in fact, it was designed for. &amp;nbsp;You
&lt;br&gt;can see that since there are several small succinct methods that you can
&lt;br&gt;override in Zend_Auth_Adapter_DbTable.
&lt;br&gt;&lt;br&gt;&amp;gt; Which brings me to the next question: &amp;nbsp;suppose you want to add an 
&lt;br&gt;&amp;gt; authentication failure code that means 'account disabled.' &amp;nbsp;Extend 
&lt;br&gt;&amp;gt; Zend_Auth_Result and have your authenticate return an instance of it?
&lt;br&gt;&lt;br&gt;It sounds like you want to build an Auth model, and inside that model,
&lt;br&gt;extends Zend_Auth_Adapter_DbTable to detect this situation. &amp;nbsp;I would
&lt;br&gt;return the standard failure constant, but also add the message that you
&lt;br&gt;feel you might want to use as the failure message.
&lt;br&gt;&lt;br&gt;-ralph
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/a-couple-questions-about-customizing-Zend_Auth-tp25598418p25668019.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25598909</id>
	<title>Re: How to set up OpenID authentication</title>
	<published>2009-09-24T10:04:36Z</published>
	<updated>2009-09-24T10:04:36Z</updated>
	<author>
		<name>funkyfly</name>
	</author>
	<content type="html">&lt;div&gt;I had problems with Google&amp;#39;s OpenId. So far I understood, Zend_OpenId was not supporting final OpenId 2.0 protocol version (only draft 11 version of it). &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Maybe you have intentions to implement it? &lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Or only me has problems with Google&amp;#39;s openId? :-)&lt;/div&gt;&lt;br clear=&quot;all&quot;&gt;--&lt;br&gt;Regards,&lt;br&gt;Vladas Diržys&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Sep 24, 2009 at 18:47, Pádraic Brady &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25598909&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;padraic.brady@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;

&lt;div&gt;&lt;div style=&quot;font-family:times new roman,new york,times,serif;font-size:12pt&quot;&gt;Unfortunately, Zend_Openid has a few issues. I started doing some testing last week and will roll in some fixes in a while. In the meantime, I suggest reverting to something like the Janrain PHP library while this is being fixed.&lt;br&gt;

&lt;div&gt; &lt;/div&gt;&lt;span style=&quot;color:rgb(0, 0, 191)&quot;&gt;&lt;font style=&quot;font-family:times new roman,new york,times,serif&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;Pádraic Brady&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;font-style:italic&quot;&gt;&lt;font style=&quot;font-family:times new roman,new york,times,serif&quot; size=&quot;3&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://blog.astrumfutura.com&quot; target=&quot;_blank&quot;&gt;http://blog.astrumfutura.com&lt;/a&gt;&lt;br&gt;

&lt;a rel=&quot;nofollow&quot; href=&quot;http://www.survivethedeepend.com&quot; target=&quot;_blank&quot;&gt;http://www.survivethedeepend.com&lt;/a&gt;&lt;br&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://www.openideurope.eu/&quot; target=&quot;_blank&quot;&gt;OpenID Europe Foundation Irish Representative&lt;/a&gt;&lt;br&gt;

&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;font-family:times new roman,new york,times,serif;font-size:12pt&quot;&gt;&lt;br&gt;&lt;div style=&quot;font-family:times new roman,new york,times,serif;font-size:12pt&quot;&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;hr size=&quot;1&quot;&gt;

&lt;b&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;From:&lt;/span&gt;&lt;/b&gt; iceangel89 &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25598909&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;comet2005@...&lt;/a&gt;&amp;gt;&lt;br&gt;&lt;b&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25598909&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-auth@...&lt;/a&gt;&lt;br&gt;

&lt;b&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;Sent:&lt;/span&gt;&lt;/b&gt; Thursday, September 24, 2009 3:12:07 PM&lt;br&gt;&lt;b&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;Subject:&lt;/span&gt;&lt;/b&gt; [fw-auth] How to set up OpenID authentication&lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;
&lt;br&gt;

How to set up OpenID authentication, something of that like &lt;a rel=&quot;nofollow&quot; href=&quot;http://stackoverflow.com/&quot; target=&quot;_blank&quot;&gt;StackOverflow&lt;/a&gt;&lt;span&gt;. 

i tried the code from &lt;a href=&quot;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&lt;/a&gt;

&lt;/span&gt;&lt;pre style=&quot;font-size:12px&quot;&gt;$status = &amp;quot;&amp;quot;;&lt;br&gt;$auth = Zend_Auth::getInstance();&lt;br&gt;if ((isset($_POST[&amp;#39;openid_action&amp;#39;]) &amp;amp;&amp;amp;&lt;br&gt;     $_POST[&amp;#39;openid_action&amp;#39;] == &amp;quot;login&amp;quot; &amp;amp;&amp;amp;&lt;br&gt;

     !empty($_POST[&amp;#39;openid_identifier&amp;#39;])) ||&lt;br&gt;    isset($_GET[&amp;#39;openid_mode&amp;#39;]) ||&lt;br&gt;    isset($_POST[&amp;#39;openid_mode&amp;#39;])) {&lt;br&gt;    $result = $auth-&amp;gt;authenticate(&lt;br&gt;        new Zend_Auth_Adapter_OpenId(@$_POST[&amp;#39;openid_identifier&amp;#39;]));&lt;br&gt;

...&lt;/pre&gt;

this code does not seem to be working... i keep getting posted back to the same page 
&lt;br&gt;&lt;hr width=&quot;300&quot; align=&quot;left&quot;&gt;
View this message in context: &lt;a rel=&quot;nofollow&quot; href=&quot;http://www.nabble.com/How-to-set-up-OpenID-authentication-tp25571181p25571181.html&quot; target=&quot;_blank&quot;&gt;How to set up OpenID authentication&lt;/a&gt;&lt;br&gt;
Sent from the &lt;a rel=&quot;nofollow&quot; href=&quot;http://www.nabble.com/Zend-Auth-f16181.html&quot; target=&quot;_blank&quot;&gt;Zend Auth mailing list archive&lt;/a&gt; at &lt;a href=&quot;http://Nabble.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Nabble.com&lt;/a&gt;.&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-set-up-OpenID-authentication-tp25571181p25598909.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25598418</id>
	<title>a couple questions about customizing Zend_Auth</title>
	<published>2009-09-24T09:32:21Z</published>
	<updated>2009-09-24T09:32:21Z</updated>
	<author>
		<name>David Mintz-3</name>
	</author>
	<content type="html">&lt;br&gt;I have tried getting Zend_Auth_Adapter_DbTable&amp;#39;s authenticate() to fetch data from multiple joined tables so that getResultRowObject() would give me everything about the user that I wanted to load into the session.  I used getDbSelect() to get the select and join() a table, and could not get it to work. (I actually thought I had it the other day, but it was a false positive.) Is this supposed to be possible? For example, I tried various variations on&lt;br&gt;
&lt;br&gt;$select = $authAdapter-&amp;gt;getDbSelect();&lt;br&gt;$select&lt;br&gt;    -&amp;gt;where(&amp;#39;users.active&amp;#39;);&lt;br&gt;    -&amp;gt;join(array(&amp;#39;groups&amp;#39;), &amp;#39;&lt;a href=&quot;http://groups.id&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;groups.id&lt;/a&gt; = users.group_id&amp;#39;,array(&amp;#39;&lt;a href=&quot;http://groups.name&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;groups.name&lt;/a&gt;&amp;#39;=&amp;gt;&amp;#39;group&amp;#39;),array())&lt;br&gt;
    -&amp;gt;join(array(&amp;#39;people&amp;#39;),&amp;#39;users.person_id = &lt;a href=&quot;http://people.id&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;people.id&lt;/a&gt;&amp;#39;,array(&amp;#39;lastname&amp;#39;,&amp;#39;firstname&amp;#39;,))&lt;br&gt;&lt;br&gt;and kept getting Zend_Auth_Adapter_Exception, invalid SQL statement.&lt;br&gt;
&lt;br&gt;In any event, I gave up on this approach and am now extending Zend_Auth_Adapter_DbTable and overriding authenticate(). Is this a reasonable solution?&lt;br&gt;&lt;br&gt;Which brings me to the next question:  suppose you want to add an authentication failure code that means &amp;#39;account disabled.&amp;#39;  Extend Zend_Auth_Result and have your authenticate return an instance of it?&lt;br&gt;
&lt;br&gt;Another possible solution:  create a view (at the database level) that pulls together all the columns I want from the different tables. Any thoughts?&lt;br&gt;&lt;br&gt;Thanks.&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;David Mintz&lt;br&gt;&lt;a href=&quot;http://davidmintz.org/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://davidmintz.org/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;The subtle source is clear and bright&lt;br&gt;The tributary streams flow through the darkness&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/a-couple-questions-about-customizing-Zend_Auth-tp25598418p25598418.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25597684</id>
	<title>Re: How to set up OpenID authentication</title>
	<published>2009-09-24T08:47:40Z</published>
	<updated>2009-09-24T08:47:40Z</updated>
	<author>
		<name>Pádraic Brady</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;font-family:times new roman,new york,times,serif;font-size:12pt&quot;&gt;Unfortunately, Zend_Openid has a few issues. I started doing some testing last week and will roll in some fixes in a while. In the meantime, I suggest reverting to something like the Janrain PHP library while this is being fixed.&lt;br&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;span style=&quot;color: rgb(0, 0, 191);&quot;&gt;&lt;font style=&quot;font-family: times new roman,new york,times,serif;&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Pádraic Brady&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;font style=&quot;font-family: times new roman,new york,times,serif;&quot; size=&quot;3&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.astrumfutura.com&quot;&gt;http://blog.astrumfutura.com&lt;/a&gt;&lt;br&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.survivethedeepend.com&quot;&gt;http://www.survivethedeepend.com&lt;/a&gt;&lt;br&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.openideurope.eu/&quot;&gt;OpenID Europe Foundation Irish Representative&lt;/a&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;font-family: times new roman,new york,times,serif; font-size: 12pt;&quot;&gt;&lt;br&gt;&lt;div style=&quot;font-family: times new roman,new york,times,serif; font-size: 12pt;&quot;&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;hr size=&quot;1&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt; iceangel89 &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25597684&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;comet2005@...&lt;/a&gt;&amp;gt;&lt;br&gt;&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25597684&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-auth@...&lt;/a&gt;&lt;br&gt;&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Sent:&lt;/span&gt;&lt;/b&gt; Thursday, September 24, 2009 3:12:07 PM&lt;br&gt;&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Subject:&lt;/span&gt;&lt;/b&gt; [fw-auth] How to set up OpenID authentication&lt;br&gt;&lt;/font&gt;&lt;br&gt;
&lt;meta http-equiv=&quot;x-dns-prefetch-control&quot; content=&quot;off&quot;&gt;
How to set up OpenID authentication, something of that like &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://stackoverflow.com/&quot;&gt;StackOverflow&lt;/a&gt;&lt;span&gt;. 

i tried the code from &lt;a target=&quot;_blank&quot; href=&quot;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&lt;/a&gt;

&lt;/span&gt;&lt;pre style=&quot;font-size: 12px;&quot;&gt;$status = &quot;&quot;;&lt;br&gt;$auth = Zend_Auth::getInstance();&lt;br&gt;if ((isset($_POST['openid_action']) &amp;amp;&amp;amp;&lt;br&gt;     $_POST['openid_action'] == &quot;login&quot; &amp;amp;&amp;amp;&lt;br&gt;     !empty($_POST['openid_identifier'])) ||&lt;br&gt;    isset($_GET['openid_mode']) ||&lt;br&gt;    isset($_POST['openid_mode'])) {&lt;br&gt;    $result = $auth-&amp;gt;authenticate(&lt;br&gt;        new Zend_Auth_Adapter_OpenId(@$_POST['openid_identifier']));&lt;br&gt;...&lt;/pre&gt;

this code does not seem to be working... i keep getting posted back to the same page 
&lt;br&gt;&lt;hr width=&quot;300&quot; align=&quot;left&quot;&gt;
View this message in context: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.nabble.com/How-to-set-up-OpenID-authentication-tp25571181p25571181.html&quot;&gt;How to set up OpenID authentication&lt;/a&gt;&lt;br&gt;
Sent from the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.nabble.com/Zend-Auth-f16181.html&quot;&gt;Zend Auth mailing list archive&lt;/a&gt; at &lt;a target=&quot;_blank&quot; href=&quot;http://Nabble.com&quot; rel=&quot;nofollow&quot;&gt;Nabble.com&lt;/a&gt;.&lt;br&gt;
&lt;meta http-equiv=&quot;x-dns-prefetch-control&quot; content=&quot;on&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;div class=&quot;signature&quot;&gt;Pádraic Brady
&lt;br&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://blog.astrumfutura.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.astrumfutura.com&lt;/a&gt;&lt;br&gt;Free Zend Framework Book: &lt;a href=&quot;http://www.survivethedeepend.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.survivethedeepend.com&lt;/a&gt;&lt;br&gt;OpenID Europe Foundation - Irish Representative&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-set-up-OpenID-authentication-tp25571181p25597684.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25571181</id>
	<title>How to set up OpenID authentication</title>
	<published>2009-09-24T07:12:07Z</published>
	<updated>2009-09-24T07:12:07Z</updated>
	<author>
		<name>iceangel89</name>
	</author>
	<content type="html">How to set up OpenID authentication, something of that like &lt;a href=&quot;http://stackoverflow.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;StackOverflow&lt;/a&gt;. 

i tried the code from &lt;a href=&quot;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/manual/en/zend.auth.adapter.openid.html&lt;/a&gt;

&lt;pre style=&quot;font-size: 12px&quot;&gt;$status = &quot;&quot;;
$auth = Zend_Auth::getInstance();
if ((isset($_POST['openid_action']) &amp;&amp;
     $_POST['openid_action'] == &quot;login&quot; &amp;&amp;
     !empty($_POST['openid_identifier'])) ||
    isset($_GET['openid_mode']) ||
    isset($_POST['openid_mode'])) {
    $result = $auth-&gt;authenticate(
        new Zend_Auth_Adapter_OpenId(@$_POST['openid_identifier']));
...&lt;/pre&gt;

this code does not seem to be working... i keep getting posted back to the same page 

UPDATE: 

oh i keep getting posted back because i forgot to add action and method attributes for the form. but now whats the meaning of Authentication failed Discovery failed?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-set-up-OpenID-authentication-tp25571181p25571181.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25502850</id>
	<title>Re: [zf-contributors] Re: [fw-auth] Re: [zf-contributors] Feedback on  Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-17T21:09:06Z</published>
	<updated>2009-09-17T21:09:06Z</updated>
	<author>
		<name>Adam Jensen-2</name>
	</author>
	<content type="html">Hello!&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Just thought I&amp;#39;d let y&amp;#39;all know that I&amp;#39;ve made a significant overhaul to my original proposal (now at &lt;a href=&quot;http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Action_Helper_AuthSelector+-+Adam+Jensen&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller_Action_Helper_AuthSelector+-+Adam+Jensen&lt;/a&gt;), reflecting what we discussed yesterday.  I think it&amp;#39;s a lot clearer now, but I&amp;#39;m open to any further suggestions.  Thanks again for your help!&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Adam&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Sep 16, 2009 at 7:36 PM, Adam Jensen &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25502850&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
Thank you both for your feedback on this; I&amp;#39;ll be adjusting the proposal to reflect the new action helper approach as soon as I can.  Seems like that&amp;#39;s a better fit, and I&amp;#39;m happy to make the necessary changes.&lt;div&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks!&lt;/div&gt;&lt;div&gt;Adam&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Sep 16, 2009 at 9:44 AM, Ralph Schindler &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25502850&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralph.schindler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;div&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
All that said, I&amp;#39;m starting to wonder if my proposal might work better as an&lt;br&gt;
action helper, since the main benefit is the simplification of controller&lt;br&gt;
logic?  It may be more complicated than that, but it&amp;#39;s probably worth some&lt;br&gt;
thought; any ideas?&lt;br&gt;
&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
This sounds like application logic in many ways -- even the forms would&lt;br&gt;
differ for each in some cases (OpenID would require a URL only; LDAP and/or&lt;br&gt;
DbTable would require user/pass, etc.). This sounds like several&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
The form part could be handled userland, but yes, an action helper that&lt;br&gt;
takes the form input and does the adapter delegation makes sense.&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
I&amp;#39;d like to see you explore the controller/action-helper route. Currently, there is not much in the way of helpers or plugins that aid Zend_Auth in &amp;quot;coupling&amp;quot; with an applications AuthController.&lt;br&gt;
&lt;br&gt;
Much like the viewRenderer helps the controller&amp;#39;s job of interacting with Zend_View, I think it makes alot of sense to have something like, say, &amp;quot;authSelector&amp;quot; to help decide and load various pieces to the authentication puzzle: forms, views, form helpers, and finally actual auth adapter.&lt;br&gt;


&lt;br&gt;
While, the term &amp;quot;flexible&amp;quot; is good, I think we need to find something more succinct that will, by name, identify its job to the developer immediately.  Since you haven&amp;#39;t gotten many comments on the original proposal, I can only guess that the naming is not something developers are immediately drawn to as its name does not conjure up any visions of what job it actually does.&lt;br&gt;


&lt;br&gt;
Looking forward to your feedback now that I have a better grasp on what it is you are attempting to do!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
-ralph&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25502850.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25483345</id>
	<title>Re: [zf-contributors] Re: [fw-auth] Re: [zf-contributors] Feedback on  Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-16T17:36:36Z</published>
	<updated>2009-09-16T17:36:36Z</updated>
	<author>
		<name>Adam Jensen-2</name>
	</author>
	<content type="html">Thank you both for your feedback on this; I&amp;#39;ll be adjusting the proposal to reflect the new action helper approach as soon as I can.  Seems like that&amp;#39;s a better fit, and I&amp;#39;m happy to make the necessary changes.&lt;div&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks!&lt;/div&gt;&lt;div&gt;Adam&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Sep 16, 2009 at 9:44 AM, Ralph Schindler &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25483345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ralph.schindler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
All that said, I&amp;#39;m starting to wonder if my proposal might work better as an&lt;br&gt;
action helper, since the main benefit is the simplification of controller&lt;br&gt;
logic?  It may be more complicated than that, but it&amp;#39;s probably worth some&lt;br&gt;
thought; any ideas?&lt;br&gt;
&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
This sounds like application logic in many ways -- even the forms would&lt;br&gt;
differ for each in some cases (OpenID would require a URL only; LDAP and/or&lt;br&gt;
DbTable would require user/pass, etc.). This sounds like several&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
The form part could be handled userland, but yes, an action helper that&lt;br&gt;
takes the form input and does the adapter delegation makes sense.&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
I&amp;#39;d like to see you explore the controller/action-helper route. Currently, there is not much in the way of helpers or plugins that aid Zend_Auth in &amp;quot;coupling&amp;quot; with an applications AuthController.&lt;br&gt;
&lt;br&gt;
Much like the viewRenderer helps the controller&amp;#39;s job of interacting with Zend_View, I think it makes alot of sense to have something like, say, &amp;quot;authSelector&amp;quot; to help decide and load various pieces to the authentication puzzle: forms, views, form helpers, and finally actual auth adapter.&lt;br&gt;

&lt;br&gt;
While, the term &amp;quot;flexible&amp;quot; is good, I think we need to find something more succinct that will, by name, identify its job to the developer immediately.  Since you haven&amp;#39;t gotten many comments on the original proposal, I can only guess that the naming is not something developers are immediately drawn to as its name does not conjure up any visions of what job it actually does.&lt;br&gt;

&lt;br&gt;
Looking forward to your feedback now that I have a better grasp on what it is you are attempting to do!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
-ralph&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25483345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25473966</id>
	<title>Re: [zf-contributors] Re: [fw-auth] Re: [zf-contributors] Feedback on	Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-16T07:44:20Z</published>
	<updated>2009-09-16T07:44:20Z</updated>
	<author>
		<name>Ralph Schindler-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt;&amp;gt; All that said, I'm starting to wonder if my proposal might work better as an
&lt;br&gt;&amp;gt;&amp;gt; action helper, since the main benefit is the simplification of controller
&lt;br&gt;&amp;gt;&amp;gt; logic? &amp;nbsp;It may be more complicated than that, but it's probably worth some
&lt;br&gt;&amp;gt;&amp;gt; thought; any ideas?
&lt;br&gt;&lt;br&gt;&amp;gt; This sounds like application logic in many ways -- even the forms would
&lt;br&gt;&amp;gt; differ for each in some cases (OpenID would require a URL only; LDAP and/or
&lt;br&gt;&amp;gt; DbTable would require user/pass, etc.). This sounds like several
&lt;br&gt;&lt;br&gt;&amp;gt; The form part could be handled userland, but yes, an action helper that
&lt;br&gt;&amp;gt; takes the form input and does the adapter delegation makes sense.
&lt;br&gt;&lt;br&gt;I'd like to see you explore the controller/action-helper route. 
&lt;br&gt;Currently, there is not much in the way of helpers or plugins that aid 
&lt;br&gt;Zend_Auth in &amp;quot;coupling&amp;quot; with an applications AuthController.
&lt;br&gt;&lt;br&gt;Much like the viewRenderer helps the controller's job of interacting 
&lt;br&gt;with Zend_View, I think it makes alot of sense to have something like, 
&lt;br&gt;say, &amp;quot;authSelector&amp;quot; to help decide and load various pieces to the 
&lt;br&gt;authentication puzzle: forms, views, form helpers, and finally actual 
&lt;br&gt;auth adapter.
&lt;br&gt;&lt;br&gt;While, the term &amp;quot;flexible&amp;quot; is good, I think we need to find something 
&lt;br&gt;more succinct that will, by name, identify its job to the developer 
&lt;br&gt;immediately. &amp;nbsp;Since you haven't gotten many comments on the original 
&lt;br&gt;proposal, I can only guess that the naming is not something developers 
&lt;br&gt;are immediately drawn to as its name does not conjure up any visions of 
&lt;br&gt;what job it actually does.
&lt;br&gt;&lt;br&gt;Looking forward to your feedback now that I have a better grasp on what 
&lt;br&gt;it is you are attempting to do!
&lt;br&gt;&lt;br&gt;-ralph
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25473966.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25471911</id>
	<title>Re: Re: [zf-contributors] Feedback on Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-16T05:52:51Z</published>
	<updated>2009-09-16T05:52:51Z</updated>
	<author>
		<name>weierophinney</name>
	</author>
	<content type="html">-- Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25471911&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;(on Tuesday, 15 September 2009, 05:43 PM -0500):
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Actually I'd spent some time looking at Zend_Auth_Adapter_Chain, but I feel
&lt;br&gt;&amp;gt; like it's addressing a different use case.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems like the chain adapter would work best in situations where the same
&lt;br&gt;&amp;gt; set of credentials could be checked against multiple authentication sources for
&lt;br&gt;&amp;gt; instance, a local username/password versus an LDAP username/password. &amp;nbsp;The
&lt;br&gt;&amp;gt; chain adapter makes it easy to support both in a single action with very little
&lt;br&gt;&amp;gt; additional controller logic.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, if the user input requirements differ for each adapter (e.g., if you
&lt;br&gt;&amp;gt; replace LDAP with OpenID in the above example), the chain approach isn't as
&lt;br&gt;&amp;gt; viable. &amp;nbsp;You now not only need differing authentication logic; you also need
&lt;br&gt;&amp;gt; differing form objects, differing view scripts, and sometimes different action
&lt;br&gt;&amp;gt; methods (esp. relevant w/OpenID, since OpenID auth takes several different
&lt;br&gt;&amp;gt; requests, and not all are guaranteed to be POSTs). &amp;nbsp;This is the use case that
&lt;br&gt;&amp;gt; my proposal is designed to address; using the adapter I've proposed, it's a lot
&lt;br&gt;&amp;gt; easier to support a wide variety of authentication adapters with a wide variety
&lt;br&gt;&amp;gt; of user input requirements from within a single, tidy controller action.
&lt;/div&gt;&lt;br&gt;Excellent synopsis of the difference in approach -- I suspected this
&lt;br&gt;might be the case, but wanted you to verify (or not). :)
&lt;br&gt;&lt;br&gt;&amp;gt; All that said, I'm starting to wonder if my proposal might work better as an
&lt;br&gt;&amp;gt; action helper, since the main benefit is the simplification of controller
&lt;br&gt;&amp;gt; logic? &amp;nbsp;It may be more complicated than that, but it's probably worth some
&lt;br&gt;&amp;gt; thought; any ideas?
&lt;br&gt;&lt;br&gt;So, what I'm understanding is that you want functionality that makes it
&lt;br&gt;possible to authenticate against any of several types of authentication
&lt;br&gt;schemes, some of which may require different credentialing mechanisms.
&lt;br&gt;&lt;br&gt;This sounds like application logic in many ways -- even the forms would
&lt;br&gt;differ for each in some cases (OpenID would require a URL only; LDAP and/or
&lt;br&gt;DbTable would require user/pass, etc.). This sounds like several
&lt;br&gt;cross-cutting concerns:
&lt;br&gt;&lt;br&gt;&amp;nbsp; * a form with multiple types of credential, and a selector to
&lt;br&gt;&amp;nbsp; &amp;nbsp; determine which to authenticate against
&lt;br&gt;&amp;nbsp; * logic to switch based on the authentication selector that would then
&lt;br&gt;&amp;nbsp; &amp;nbsp; instantiate the appropriate auth adapter and validate it
&lt;br&gt;&lt;br&gt;The form part could be handled userland, but yes, an action helper that
&lt;br&gt;takes the form input and does the adapter delegation makes sense.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, Sep 15, 2009 at 11:29 AM, Matthew Weier O'Phinney &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25471911&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; -- Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25471911&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (on Tuesday, 15 September 2009, 09:40 AM -0500):
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Several months ago I posted a proposal (&lt;a href=&quot;http://framework.zend.com/wiki/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; display/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; ZFPROP/Zend_Auth_Adapter_Flexible+-+Adam+Jensen) for a new kind of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; authentication adapter which simplifies the process of allowing multiple
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; modes
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; of authentication (e.g., email/pass and OpenID) via the same controller
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; view code.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Unfortunately, I haven't received any community feedback, which either
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; means my
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; proposal is (a) perfect, or (b) totally uninteresting :) &amp;nbsp;I was hoping I
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; could
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; entice some of you to take a look at it in the next couple of days to see
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; if
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; there's anything I can improve before I promote it to Ready for
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Recommendation.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; Please let me know what you think; personally, I've found that this
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; approach
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; saves me a heck of a lot of code, and I'd love to see it added to the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; framework.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; There's actually a proposal already accepted, Zend_Auth_Adapter_Chain,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; which may already do much of what you're proposing:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://framework.zend.com/wiki/display/ZFPROP/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFPROP/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Zend_Auth_Adapter_Chain+-+Geoffrey+Tran
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I'm not sure what Geoffrey's timeframe for completion is, however.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; --
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Matthew Weier O'Phinney
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25471911&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Matthew Weier O'Phinney
&lt;br&gt;Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25471911&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25471911.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25463086</id>
	<title>Re: Re: [zf-contributors] Feedback on Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-15T15:43:13Z</published>
	<updated>2009-09-15T15:43:13Z</updated>
	<author>
		<name>Adam Jensen-2</name>
	</author>
	<content type="html">Hello!&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Actually I&amp;#39;d spent some time looking at Zend_Auth_Adapter_Chain, but I feel like it&amp;#39;s addressing a different use case.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It seems like the chain adapter would work best in situations where the same set of credentials could be checked against multiple authentication sources…for instance, a local username/password versus an LDAP username/password.  The chain adapter makes it easy to support both in a single action with very little additional controller logic.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;However, if the user input requirements differ for each adapter (e.g., if you replace LDAP with OpenID in the above example), the chain approach isn&amp;#39;t as viable.  You now not only need differing authentication logic; you also need differing form objects, differing view scripts, and sometimes different action methods (esp. relevant w/OpenID, since OpenID auth takes several different requests, and not all are guaranteed to be POSTs).  This is the use case that my proposal is designed to address; using the adapter I&amp;#39;ve proposed, it&amp;#39;s a lot easier to support a wide variety of authentication adapters with a wide variety of user input requirements from within a single, tidy controller action.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;All that said, I&amp;#39;m starting to wonder if my proposal might work better as an action helper, since the main benefit is the simplification of controller logic?  It may be more complicated than that, but it&amp;#39;s probably worth some thought; any ideas?&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks!&lt;/div&gt;&lt;div&gt;Adam&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Sep 15, 2009 at 11:29 AM, Matthew Weier O&amp;#39;Phinney &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25463086&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;-- Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25463086&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote&lt;br&gt;
(on Tuesday, 15 September 2009, 09:40 AM -0500):&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;gt; Several months ago I posted a proposal (&lt;a href=&quot;http://framework.zend.com/wiki/display/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/&lt;/a&gt;&lt;br&gt;
&amp;gt; ZFPROP/Zend_Auth_Adapter_Flexible+-+Adam+Jensen) for a new kind of&lt;br&gt;
&amp;gt; authentication adapter which simplifies the process of allowing multiple modes&lt;br&gt;
&amp;gt; of authentication (e.g., email/pass and OpenID) via the same controller and&lt;br&gt;
&amp;gt; view code.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Unfortunately, I haven&amp;#39;t received any community feedback, which either means my&lt;br&gt;
&amp;gt; proposal is (a) perfect, or (b) totally uninteresting :)  I was hoping I could&lt;br&gt;
&amp;gt; entice some of you to take a look at it in the next couple of days to see if&lt;br&gt;
&amp;gt; there&amp;#39;s anything I can improve before I promote it to Ready for Recommendation.&lt;br&gt;
&amp;gt;   Please let me know what you think; personally, I&amp;#39;ve found that this approach&lt;br&gt;
&amp;gt; saves me a heck of a lot of code, and I&amp;#39;d love to see it added to the&lt;br&gt;
&amp;gt; framework.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;There&amp;#39;s actually a proposal already accepted, Zend_Auth_Adapter_Chain,&lt;br&gt;
which may already do much of what you&amp;#39;re proposing:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Chain+-+Geoffrey+Tran&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Chain+-+Geoffrey+Tran&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I&amp;#39;m not sure what Geoffrey&amp;#39;s timeframe for completion is, however.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
Matthew Weier O&amp;#39;Phinney&lt;br&gt;
Project Lead            | &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25463086&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;&lt;br&gt;
Zend Framework          | &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25463086.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25457395</id>
	<title>Re: [zf-contributors] Feedback on Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-15T09:29:11Z</published>
	<updated>2009-09-15T09:29:11Z</updated>
	<author>
		<name>weierophinney</name>
	</author>
	<content type="html">-- Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25457395&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;(on Tuesday, 15 September 2009, 09:40 AM -0500):
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Several months ago I posted a proposal (&lt;a href=&quot;http://framework.zend.com/wiki/display/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/&lt;/a&gt;&lt;br&gt;&amp;gt; ZFPROP/Zend_Auth_Adapter_Flexible+-+Adam+Jensen) for a new kind of
&lt;br&gt;&amp;gt; authentication adapter which simplifies the process of allowing multiple modes
&lt;br&gt;&amp;gt; of authentication (e.g., email/pass and OpenID) via the same controller and
&lt;br&gt;&amp;gt; view code. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Unfortunately, I haven't received any community feedback, which either means my
&lt;br&gt;&amp;gt; proposal is (a) perfect, or (b) totally uninteresting :) &amp;nbsp;I was hoping I could
&lt;br&gt;&amp;gt; entice some of you to take a look at it in the next couple of days to see if
&lt;br&gt;&amp;gt; there's anything I can improve before I promote it to Ready for Recommendation.
&lt;br&gt;&amp;gt; &amp;nbsp; Please let me know what you think; personally, I've found that this approach
&lt;br&gt;&amp;gt; saves me a heck of a lot of code, and I'd love to see it added to the
&lt;br&gt;&amp;gt; framework.
&lt;/div&gt;&lt;br&gt;There's actually a proposal already accepted, Zend_Auth_Adapter_Chain,
&lt;br&gt;which may already do much of what you're proposing:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Chain+-+Geoffrey+Tran&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Chain+-+Geoffrey+Tran&lt;/a&gt;&lt;br&gt;&lt;br&gt;I'm not sure what Geoffrey's timeframe for completion is, however.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Matthew Weier O'Phinney
&lt;br&gt;Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25457395&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25457395.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25455265</id>
	<title>Feedback on Zend_Auth_Adapter_Flexible?</title>
	<published>2009-09-15T07:40:22Z</published>
	<updated>2009-09-15T07:40:22Z</updated>
	<author>
		<name>Adam Jensen-2</name>
	</author>
	<content type="html">Hello!&lt;br&gt;&lt;br&gt;Several months ago I posted a proposal (&lt;a href=&quot;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Flexible+-+Adam+Jensen&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFPROP/Zend_Auth_Adapter_Flexible+-+Adam+Jensen&lt;/a&gt;) for a new kind of authentication adapter which simplifies the process of allowing multiple modes of authentication (e.g., email/pass and OpenID) via the same controller and view code.  &lt;br&gt;
&lt;br&gt;Unfortunately, I haven&amp;#39;t received any community feedback, which either means my proposal is (a) perfect, or (b) totally uninteresting :)  I was hoping I could entice some of you to take a look at it in the next couple of days to see if there&amp;#39;s anything I can improve before I promote it to Ready for Recommendation.  Please let me know what you think; personally, I&amp;#39;ve found that this approach saves me a heck of a lot of code, and I&amp;#39;d love to see it added to the framework.&lt;br&gt;
&lt;br&gt;Thanks!&lt;br&gt;Adam&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feedback-on-Zend_Auth_Adapter_Flexible--tp25455265p25455265.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25454637</id>
	<title>Most Wanted: Zend_Acl Issues</title>
	<published>2009-09-15T07:03:55Z</published>
	<updated>2009-09-15T07:03:55Z</updated>
	<author>
		<name>Ralph Schindler-2</name>
	</author>
	<content type="html">Hello everyone,
&lt;br&gt;&lt;br&gt;With the new states added to Zend Framework issues tracker, I have 
&lt;br&gt;pruned and triaged Zend_Acl's issues. &amp;nbsp;You can tell them by the icon 
&lt;br&gt;that looks like this:
&lt;br&gt;&lt;br&gt;[I]
&lt;br&gt;&lt;br&gt;in the link below:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://framework.zend.com/issues/secure/IssueNavigator.jspa?resolution=-1&amp;component=10070&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/issues/secure/IssueNavigator.jspa?resolution=-1&amp;component=10070&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;There are several issues listed (about 7) that sound like reasonable 
&lt;br&gt;requests or need further exploration, but are outside the scope of the 
&lt;br&gt;ZF Dev Team to work on.
&lt;br&gt;&lt;br&gt;If anyone would like to take them on, please let me know and we can work 
&lt;br&gt;together on a resolution.
&lt;br&gt;&lt;br&gt;Some of them include:
&lt;br&gt;&lt;br&gt;* Zend_Acl::Zend_Acl_Resource - equal childs for different parents
&lt;br&gt;* Add methods to get defined roles, resources, rules
&lt;br&gt;* Allow roles to be entered in array format in isAllowed
&lt;br&gt;* Database Driven ACL
&lt;br&gt;* add method to get parent resource and methods get all parents of roles 
&lt;br&gt;or resources
&lt;br&gt;* Support adding parent(s) to existing Role
&lt;br&gt;* Zend_Acl : debug for inheritance of rules : get source from used rule
&lt;br&gt;&lt;br&gt;While I encourage anyone to take what they find interesting, you can 
&lt;br&gt;also see what might be higher priority by looking at the votes column to 
&lt;br&gt;see how many people would be waiting on such a feature.
&lt;br&gt;&lt;br&gt;I'll be in #zftalk.dev, or reply to this thread if you'd like to take 
&lt;br&gt;something on.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;-ralph
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Most-Wanted%3A-Zend_Acl-Issues-tp25454637p25454637.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25422786</id>
	<title>Odd behaviour with storage cookie.</title>
	<published>2009-09-13T05:22:30Z</published>
	<updated>2009-09-13T05:22:30Z</updated>
	<author>
		<name>whisher</name>
	</author>
	<content type="html">&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I'm using a Storage_Cookie like 
&lt;a href=&quot;http://metaversedeveloper.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://metaversedeveloper.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/&lt;/a&gt; I only add json_encode/decode
to manage the not scalar data.&lt;/p&gt;
&lt;p&gt;I've had trouble with the logout method because the
$auth-&gt;hasIdentity() was still true after the logout action.&lt;p&gt;
&lt;p&gt;I end up with this code and it works but it seems to me just a little odd &lt;/p&gt;
&lt;pre&gt;
public function clear()
    {
        if (!setcookie($this-&gt;_cookieName,
                       false, // clears the cookie
                       time()-$this-&gt;_expire,
                       $this-&gt;getBasedir())) {
            throw new Zend_Auth_Storage_Exception('Failed to clear cookie');
        }
        /* odd ! with a DEBUG session it is set with the user email !!!!!!!
used as identity
 */
        unset($_SESSION[$this-&gt;_cookieName]);
        unset($_COOKIE[$this-&gt;_cookieName]);
    }

&lt;p&gt;In my bootstrap&lt;/p&gt;
&lt;pre&gt;
protected function _initAuth()
    {
        $auth = Zend_Auth::getInstance(); 
        if(null !== W_Cookie::get('wh')){
            $auth-&gt;setStorage(new W_Auth_Storage_Cookie(md5('ayn'), md5('ayn')));
        }
        else{
            $auth-&gt;setStorage(new Zend_Auth_Storage_Session(md5('ayn')));
        }
        Zend_Registry::set('auth', $auth);
    }
&lt;p&gt;In my controller&lt;/p&gt;
&lt;pre&gt;
LOGIN
W_Cookie::deleteCookie('wh'); 
                    if(!empty($remember)){
                         W_Cookie::setCookie('wh',md5(time())); 
                         $this-&gt;auth-&gt;setStorage(new W_Auth_Storage_Cookie(md5('ayn'), md5('ayn')));
                    }
                    $this-&gt;auth-&gt;getStorage()-&gt;write($data);

LOGOUT
 W_Cookie::deleteCookie('wh'); 
        $this-&gt;auth-&gt;clearIdentity();
        $this-&gt;_helper-&gt;redirector('index','index','default');


&lt;p&gt;Does anyone know why ?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt;Bye&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Odd-behaviour-with-storage-cookie.-tp25422786p25422786.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25303655</id>
	<title>Re: Zend_Acl and pagination</title>
	<published>2009-09-04T16:59:53Z</published>
	<updated>2009-09-04T16:59:53Z</updated>
	<author>
		<name>Matthew Ratzloff</name>
	</author>
	<content type="html">Of course I meant asynchronously, not synchronously.
&lt;br&gt;&lt;br&gt;-Matt
&lt;br&gt;&lt;br&gt;On Friday, September 4, 2009, Matthew Ratzloff &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303655&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matt@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Adam,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That sounds like it may be premature optimization.  If you find while
&lt;br&gt;&amp;gt; testing that it is a problem, however, create a script that generates
&lt;br&gt;&amp;gt; lists for each role and kick it off synchronously when an article is
&lt;br&gt;&amp;gt; created or deleted.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Matt
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Friday, September 4, 2009, Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303655&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Interesting…I hadn't thought to apply caching in that way; good call.  Allows me to do all the access control at the application level rather than tying it to the database, which is exactly what I wanted.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The one downside, I suppose, is that the unlucky user who hits the site when neither cache has been generated yet will have to wait quite awhile, especially if there are lots of posts in the database, since that initial query doesn't have the benefit of pagination at all.  I suppose I could try to grab that request via a cron job periodically so that it didn't have to affect any live users.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Anyway, thanks for your help!
&lt;br&gt;&amp;gt;&amp;gt; Adam
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Fri, Sep 4, 2009 at 12:20 PM, Matthew Ratzloff &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303655&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matt@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi Adam,
&lt;br&gt;&amp;gt;&amp;gt; I'd store an array representation of the result set in memory (memcache or similar) and apply the ACL rules against the cached array, generating a new array you can paginate.  Cache this new array with an ID that is easily recoverable.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; {{{if specific array does not exist in memcache    if raw array does not exist in memcache        query database        store array in memcache    end if
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     create specific array from filtered raw array    store specific arrayend if
&lt;br&gt;&amp;gt;&amp;gt; return specific array}}}
&lt;br&gt;&amp;gt;&amp;gt; -Matt
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Fri, Sep 4, 2009 at 5:55 AM, Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303655&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hello!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Got an interesting problem I was hoping some of you could help me with.  I'm trying to figure out the best way to do result set pagination in combination with Zend_Acl-based access control.  Let me explain…
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Start with the following assumptions:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 1. You have a database table containing 500 or so blog posts.
&lt;br&gt;&amp;gt;&amp;gt; 2. One of the resources set up in your Bootstrap class is a Zend_Acl object, containing all the rules you'll need to control access to those blog posts.  Some of these rules might be based on stuff in the database, but some of them might not be…the ACL object controls all that.
&lt;br&gt;&amp;gt;&amp;gt; 3. You want to set up a paginated listing view for your blog posts; each page is to list exactly 10 posts, and contain pagination links to get to all the other pages.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So, in the action method for that listing view, we do the following:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 1. Pull the models in by database query (really, the query would probably be in a service layer rather than hard-coded into the action, but for this example that's not really important)
&lt;br&gt;&amp;gt;&amp;gt; 2. Loop through the result set and check each result against the ACL object to see if it's allowed for the current user; if not, remove it from the result set.
&lt;br&gt;&amp;gt;&amp;gt; 3. Pass the adjusted result set to the view for rendering.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Suppose, however, that of the 10 results we get back, 3 of them aren't permissible for the current user.  That means we're only left with 7 results to show, when the user is expecting 10.  Or, suppose that of the 10 results, all 10 are impermissible…in that case, the user sees nothing but a set of pagination links, with no guarantee that any of the links will lead to better results.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now, one possible solution here would be to adjust the database query to account for access control, but then we'd have to maintain access control logic in two places: the ACL and the database query itself.  Plus, if the ACL object is basing its rules on information not found in the database (dunno how realistic that is, but I'm exploring all angles), we can't take this approach at all.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So the problem in a nutshell is this: how can I ensure a paginated result set of exactly 10 items per page when the access control is handled outside of the database query?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;&amp;gt; Adam Jensen
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-and-pagination-tp25293854p25303655.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25303643</id>
	<title>Re: Zend_Acl and pagination</title>
	<published>2009-09-04T16:58:07Z</published>
	<updated>2009-09-04T16:58:07Z</updated>
	<author>
		<name>Matthew Ratzloff</name>
	</author>
	<content type="html">Hi Adam,
&lt;br&gt;&lt;br&gt;That sounds like it may be premature optimization. &amp;nbsp;If you find while
&lt;br&gt;testing that it is a problem, however, create a script that generates
&lt;br&gt;lists for each role and kick it off synchronously when an article is
&lt;br&gt;created or deleted.
&lt;br&gt;&lt;br&gt;-Matt
&lt;br&gt;&lt;br&gt;On Friday, September 4, 2009, Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303643&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Interesting…I hadn't thought to apply caching in that way; good call.  Allows me to do all the access control at the application level rather than tying it to the database, which is exactly what I wanted.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The one downside, I suppose, is that the unlucky user who hits the site when neither cache has been generated yet will have to wait quite awhile, especially if there are lots of posts in the database, since that initial query doesn't have the benefit of pagination at all.  I suppose I could try to grab that request via a cron job periodically so that it didn't have to affect any live users.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyway, thanks for your help!
&lt;br&gt;&amp;gt; Adam
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Sep 4, 2009 at 12:20 PM, Matthew Ratzloff &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303643&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matt@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hi Adam,
&lt;br&gt;&amp;gt; I'd store an array representation of the result set in memory (memcache or similar) and apply the ACL rules against the cached array, generating a new array you can paginate.  Cache this new array with an ID that is easily recoverable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; {{{if specific array does not exist in memcache    if raw array does not exist in memcache        query database        store array in memcache    end if
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     create specific array from filtered raw array    store specific arrayend if
&lt;br&gt;&amp;gt; return specific array}}}
&lt;br&gt;&amp;gt; -Matt
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Sep 4, 2009 at 5:55 AM, Adam Jensen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25303643&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Got an interesting problem I was hoping some of you could help me with.  I'm trying to figure out the best way to do result set pagination in combination with Zend_Acl-based access control.  Let me explain…
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Start with the following assumptions:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. You have a database table containing 500 or so blog posts.
&lt;br&gt;&amp;gt; 2. One of the resources set up in your Bootstrap class is a Zend_Acl object, containing all the rules you'll need to control access to those blog posts.  Some of these rules might be based on stuff in the database, but some of them might not be…the ACL object controls all that.
&lt;br&gt;&amp;gt; 3. You want to set up a paginated listing view for your blog posts; each page is to list exactly 10 posts, and contain pagination links to get to all the other pages.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So, in the action method for that listing view, we do the following:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. Pull the models in by database query (really, the query would probably be in a service layer rather than hard-coded into the action, but for this example that's not really important)
&lt;br&gt;&amp;gt; 2. Loop through the result set and check each result against the ACL object to see if it's allowed for the current user; if not, remove it from the result set.
&lt;br&gt;&amp;gt; 3. Pass the adjusted result set to the view for rendering.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suppose, however, that of the 10 results we get back, 3 of them aren't permissible for the current user.  That means we're only left with 7 results to show, when the user is expecting 10.  Or, suppose that of the 10 results, all 10 are impermissible…in that case, the user sees nothing but a set of pagination links, with no guarantee that any of the links will lead to better results.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now, one possible solution here would be to adjust the database query to account for access control, but then we'd have to maintain access control logic in two places: the ACL and the database query itself.  Plus, if the ACL object is basing its rules on information not found in the database (dunno how realistic that is, but I'm exploring all angles), we can't take this approach at all.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So the problem in a nutshell is this: how can I ensure a paginated result set of exactly 10 items per page when the access control is handled outside of the database query?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; Adam Jensen
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-and-pagination-tp25293854p25303643.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25302785</id>
	<title>Re: Zend_Acl and pagination</title>
	<published>2009-09-04T15:11:50Z</published>
	<updated>2009-09-04T15:11:50Z</updated>
	<author>
		<name>Adam Jensen-2</name>
	</author>
	<content type="html">Interesting…I hadn&amp;#39;t thought to apply caching in that way; good call.  Allows me to do all the access control at the application level rather than tying it to the database, which is exactly what I wanted.  &lt;br&gt;&lt;br&gt;The one downside, I suppose, is that the unlucky user who hits the site when neither cache has been generated yet will have to wait quite awhile, especially if there are lots of posts in the database, since that initial query doesn&amp;#39;t have the benefit of pagination at all.  I suppose I could try to grab that request via a cron job periodically so that it didn&amp;#39;t have to affect any live users.&lt;br&gt;
&lt;br&gt;Anyway, thanks for your help!&lt;br&gt;Adam&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Sep 4, 2009 at 12:20 PM, Matthew Ratzloff &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25302785&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matt@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hi Adam,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;d store an array representation of the result set in memory (memcache or similar) and apply the ACL rules against the cached array, generating a new array you can paginate.  Cache this new array with an ID that is easily recoverable.&lt;div&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;{{{&lt;/div&gt;&lt;div&gt;if specific array does not exist in memcache&lt;/div&gt;&lt;div&gt;    if raw array does not exist in memcache&lt;/div&gt;&lt;div&gt;        query database&lt;/div&gt;&lt;div&gt;        store array in memcache&lt;/div&gt;&lt;div&gt;    end if&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    create specific array from filtered raw array&lt;/div&gt;&lt;div&gt;    store specific array&lt;/div&gt;&lt;div&gt;end if&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;return specific array&lt;/div&gt;&lt;div&gt;}}}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Matt&lt;/div&gt;&lt;div&gt;

&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;div class=&quot;im&quot;&gt;On Fri, Sep 4, 2009 at 5:55 AM, Adam Jensen &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25302785&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jazzslider@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;/div&gt;&lt;div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hello!&lt;br&gt;&lt;br&gt;Got an interesting problem I was hoping some of you could help me with.  I&amp;#39;m trying to figure out the best way to do result set pagination in combination with Zend_Acl-based access control.  Let me explain…&lt;br&gt;


&lt;br&gt;Start with the following assumptions:&lt;br&gt;&lt;br&gt;1. You have a database table containing 500 or so blog posts.&lt;br&gt;2. One of the resources set up in your Bootstrap class is a Zend_Acl object, containing all the rules you&amp;#39;ll need to control access to those blog posts.  Some of these rules might be based on stuff in the database, but some of them might not be…the ACL object controls all that.&lt;br&gt;


3. You want to set up a paginated listing view for your blog posts; each page is to list exactly 10 posts, and contain pagination links to get to all the other pages.&lt;br&gt;&lt;br&gt;So, in the action method for that listing view, we do the following:&lt;br&gt;


&lt;br&gt;1. Pull the models in by database query (really, the query would probably be in a service layer rather than hard-coded into the action, but for this example that&amp;#39;s not really important)&lt;br&gt;2. Loop through the result set and check each result against the ACL object to see if it&amp;#39;s allowed for the current user; if not, remove it from the result set.&lt;br&gt;


3. Pass the adjusted result set to the view for rendering.&lt;br&gt;&lt;br&gt;Suppose, however, that of the 10 results we get back, 3 of them aren&amp;#39;t permissible for the current user.  That means we&amp;#39;re only left with 7 results to show, when the user is expecting 10.  Or, suppose that of the 10 results, all 10 are impermissible…in that case, the user sees nothing but a set of pagination links, with no guarantee that any of the links will lead to better results.&lt;br&gt;


&lt;br&gt;Now, one possible solution here would be to adjust the database query to account for access control, but then we&amp;#39;d have to maintain access control logic in two places: the ACL and the database query itself.  Plus, if the ACL object is basing its rules on information not found in the database (dunno how realistic that is, but I&amp;#39;m exploring all angles), we can&amp;#39;t take this approach at all.&lt;br&gt;


&lt;br&gt;So the problem in a nutshell is this: how can I ensure a paginated result set of exactly 10 items per page when the access control is handled outside of the database query?&lt;br&gt;&lt;br&gt;Thanks!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;Adam Jensen&lt;br&gt;


&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Acl-and-pagination-tp25293854p25302785.html" />
</entry>

</feed>
