Apache Zeta Components Manual :: File Source for openid_association.php

Source for file openid_association.php

Documentation is available at openid_association.php

  1. <?php
  2. /**
  3.  * File containing the ezcAuthenticationOpenidAssociation structure.
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  23.  * @filesource
  24.  * @package Authentication
  25.  * @version //autogen//
  26.  */
  27.  
  28. /**
  29.  * Structure for defining an OpenID association between the server and the
  30.  * OpenID provider.
  31.  *
  32.  * @package Authentication
  33.  * @version //autogen//
  34.  */
  35. {
  36.     /**
  37.      * The handle given by the OpenID provider to this association.
  38.      *
  39.      * @var string 
  40.      */
  41.     public $handle;
  42.  
  43.     /**
  44.      * The shared secret generated by the OpenID provider.
  45.      *
  46.      * @var string 
  47.      */
  48.     public $secret;
  49.  
  50.     /**
  51.      * The UNIX timestamp when the secret was generated.
  52.      *
  53.      * @var int 
  54.      */
  55.     public $issued;
  56.  
  57.     /**
  58.      * The amount of seconds the association is valid.
  59.      *
  60.      * @var int 
  61.      */
  62.     public $validity;
  63.  
  64.     /**
  65.      * The type of the association. Currently only 'HMAC-SHA1' is supported
  66.      * by the OpenID implementations.
  67.      *
  68.      * @var string 
  69.      */
  70.     public $type;
  71.  
  72.     /**
  73.      * Constructs a new ezcAuthenticationOpenidAssociation object.
  74.      *
  75.      * @param string $handle Handle given by the OpenID provider to the association
  76.      * @param string $secret The shared secret generated by the OpenID provider
  77.      * @param int $issued The UNIX timestamp when the secret was generated
  78.      * @param int $validity The amount of seconds the aasociation is valid
  79.      * @param string $type The type of the association. Default is 'HMAC-SHA1'
  80.      */
  81.     public function __construct$handle$secret$issued$validity$type 'HMAC-SHA1' )
  82.     {
  83.         $this->handle = $handle;
  84.         $this->secret = $secret;
  85.         $this->issued = $issued;
  86.         $this->validity = $validity;
  87.         $this->type = $type;
  88.     }
  89.  
  90.     /**
  91.      * Returns a new instance of this class with the data specified by $array.
  92.      *
  93.      * $array contains all the data members of this class in the form:
  94.      * array('member_name'=>value).
  95.      *
  96.      * __set_state makes this class exportable with var_export.
  97.      * var_export() generates code, that calls this method when it
  98.      * is parsed with PHP.
  99.      *
  100.      * @param array(string=>mixed) $array Associative array of data members for this class
  101.      * @return ezcAuthenticationOpenidAssociation 
  102.      */
  103.     static public function __set_statearray $array )
  104.     {
  105.         return new ezcAuthenticationOpenidAssociation$array['handle']$array['secret']$array['issued']$array['validity']$array['type');
  106.     }
  107. }
  108. ?>
Documentation generated by phpDocumentor 1.4.3