Author: chabotc
Date: Sat Aug 23 06:46:15 2008
New Revision: 688322

URL: http://svn.apache.org/viewvc?rev=688322&view=rev
Log:
SHINDIG-529 by Artemy Tregubenko: Simplify overriding of BasicSecurityToken

Modified:
    
incubator/shindig/trunk/php/src/common/samplecontainer/BasicSecurityToken.php

Modified: 
incubator/shindig/trunk/php/src/common/samplecontainer/BasicSecurityToken.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/samplecontainer/BasicSecurityToken.php?rev=688322&r1=688321&r2=688322&view=diff
==============================================================================
--- 
incubator/shindig/trunk/php/src/common/samplecontainer/BasicSecurityToken.php 
(original)
+++ 
incubator/shindig/trunk/php/src/common/samplecontainer/BasicSecurityToken.php 
Sat Aug 23 06:46:15 2008
@@ -29,7 +29,7 @@
        private $tokenData;
        
        /** tool to use for signing and encrypting the token */
-       private $crypter;
+       protected $crypter;
        
        private $OWNER_KEY = "o";
        private $APP_KEY = "a";
@@ -74,7 +74,7 @@
 
        public function __construct($token, $maxAge, $owner, $viewer, $app, 
$domain, $appUrl, $moduleId)
        {
-               $this->crypter = new BasicBlobCrypter();
+               $this->crypter = $this->getCrypter();
                if (! empty($token)) {
                        $this->token = $token;
                        $this->tokenData = $this->crypter->unwrap($token, 
$maxAge);
@@ -89,6 +89,11 @@
                        $this->token = $this->crypter->wrap($this->tokenData);
                }
        }
+       
+       protected function getCrypter()
+       {
+               return new BasicBlobCrypter();
+       } 
 
        public function isAnonymous()
        {


Reply via email to