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

Source for file openid_store.php

Documentation is available at openid_store.php

  1. <?php
  2. /**
  3.  * File containing the ezcAuthenticationOpenidStore class.
  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.  * Abstract class which provides a base for store (backend) implementations to
  30.  * be used in OpenID authentication.
  31.  *
  32.  * @package Authentication
  33.  * @version //autogen//
  34.  */
  35. {
  36.     /**
  37.      * Options for OpenID stores.
  38.      * 
  39.      * @var ezcAuthenticationOpenidStoreOptions 
  40.      */
  41.     protected $options;
  42.  
  43.     /**
  44.      * Sets the options of this class to $options.
  45.      *
  46.      * @param ezcAuthenticationOpenidStoreOptions $options Options for this class
  47.      */
  48.     public function setOptionsezcAuthenticationOpenidStoreOptions $options )
  49.     {
  50.         $this->options = $options;
  51.     }
  52.  
  53.     /**
  54.      * Returns the options of this class.
  55.      *
  56.      * @return ezcAuthenticationOpenidStoreOptions 
  57.      */
  58.     public function getOptions()
  59.     {
  60.         return $this->options;
  61.     }
  62.  
  63.     /**
  64.      * Stores the nonce in the store.
  65.      *
  66.      * Returns true if the nonce was stored successfully, and false otherwise.
  67.      *
  68.      * @param string $nonce The nonce value to store
  69.      * @return bool 
  70.      */
  71.     abstract public function storeNonce$nonce );
  72.  
  73.     /**
  74.      * Checks if the nonce exists and afterwards deletes it.
  75.      *
  76.      * Returns true if the nonce can be used (exists and it is still valid), and
  77.      * false otherwise.
  78.      *
  79.      * @param string $nonce The nonce value to check and delete
  80.      * @return bool 
  81.      */
  82.     abstract public function useNonce$nonce );
  83.  
  84.     /**
  85.      * Stores an association in the store linked to the OpenID provider URL.
  86.      *
  87.      * Returns true if the association was stored successfully, and false
  88.      * otherwise.
  89.      *
  90.      * @param string $url The URL of the OpenID provider
  91.      * @param ezcAuthenticationOpenidAssociation $association The association value to store
  92.      * @return bool 
  93.      */
  94.     abstract public function storeAssociation$url$association );
  95.  
  96.     /**
  97.      * Returns the association linked to the OpenID provider URL.
  98.      *
  99.      * Returns null if the association could not be retrieved.
  100.      *
  101.      * @param string $url The URL of the OpenID provider
  102.      * @return ezcAuthenticationOpenidAssociation 
  103.      */
  104.     abstract public function getAssociation$url );
  105.  
  106.     /**
  107.      * Removes the association linked to the OpenID provider URL.
  108.      *
  109.      * Returns true if the association could be removed, and false otherwise.
  110.      *
  111.      * @param string $url The URL of the OpenID provider
  112.      * @return bool 
  113.      */
  114.     abstract public function removeAssociation$url );
  115. }
  116. ?>
Documentation generated by phpDocumentor 1.4.3