summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-03-02 22:06:58 +0000
committertailor <cygnus@janrain.com>2007-03-02 22:06:58 +0000
commit4a279473ce570b1e639e4c0fc9d64528ec9a9291 (patch)
tree43851fae3325411fdd667dd5b907d118399e3fb1
parent2b5aa0514a134bb1d369b0af466ec9591d5c679d (diff)
downloadphp-openid-4a279473ce570b1e639e4c0fc9d64528ec9a9291.zip
php-openid-4a279473ce570b1e639e4c0fc9d64528ec9a9291.tar.gz
php-openid-4a279473ce570b1e639e4c0fc9d64528ec9a9291.tar.bz2
[project @ Make the GenericConsumer a parameter to Consumer]
-rw-r--r--Auth/OpenID/Consumer.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php
index 76f2ae2..2647370 100644
--- a/Auth/OpenID/Consumer.php
+++ b/Auth/OpenID/Consumer.php
@@ -257,14 +257,21 @@ class Auth_OpenID_Consumer {
* need to pass something here if you have your own sessioning
* implementation.
*/
- function Auth_OpenID_Consumer(&$store, $session = null)
+ function Auth_OpenID_Consumer(&$store, $session = null,
+ $consumer_cls = null)
{
if ($session === null) {
$session = new Services_Yadis_PHPSession();
}
$this->session =& $session;
- $this->consumer =& new Auth_OpenID_GenericConsumer($store);
+
+ if ($consumer_cls !== null) {
+ $this->consumer =& new $consumer_cls($store);
+ } else {
+ $this->consumer =& new Auth_OpenID_GenericConsumer($store);
+ }
+
$this->_token_key = $this->session_key_prefix . $this->_token_suffix;
}