Path

ez components / documentation / api reference / 2009.1rc1 / authentication


eZ Components 2009.1rc1

Authentication: ezcAuthenticationOpenidOptions

[ Tutorial ] [ Rfcs ] [ Security ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcAuthenticationOpenidOptions

Class containing the options for the OpenID authentication filter. [source]
Example of use:
 1.  // create an options object
 2.   $options new ezcAuthenticationOpenidOptions();
 3.  $options->mode ezcAuthenticationOpenidFilter::MODE_SMART;
 4.  $options->store new ezcAuthenticationOpenidFileStore'/tmp/store' );
 5.  $options->timeout 5;
 6.  $options->timeoutOpen 3;
 7.  $options->requestSource $_POST;
 8.  $options->immediate true;
 9.  $options->returnUrl 'http://example.com';
10.  $options->openidVersion ezcAuthenticationOpenidFilter::VERSION_2_0;
11.  
12.  // use the options object when creating a new OpenID filter
13.   $filter new ezcAuthenticationOpenidFilter$options );
14.  
15.  // alternatively, you can set the options to an existing filter
16.   $filter new ezcAuthenticationSession();
17.  $filter->setOptions$options );

Parents

ezcBaseOptions
   |
   --ezcAuthenticationFilterOptions
      |
      --ezcAuthenticationOpenidOptions

Properties

bool read/write  $immediate
Enables OpenID checkid_immediate instead of checkid_setup. See the ezcAuthenticationOpenidFilter class documentation for more details. It is false by default (use checkid_setup by default).
int read/write  $mode
The OpenID mode to use for authentication. It is either dumb (ezcAuthenticationOpenidFilter::MODE_DUMB, default) or smart (ezcAuthenticationOpenidFilter::MODE_SMART). In dumb mode the OpenID server does most of the work, but an extra check is required (check_authentication step). In smart mode the server and the OpenIP provider establish a shared secret (with an expiry period) that is used to sign the responses, so the check_authentication step is not required.
string read/write  $nonceKey
The query key that identifies the nonce value, default 'nonce'.
int read/write  $nonceLength
The length of the generated nonces, default 6.
int read/write  $nonceValidity
The amount of seconds the nonces are allowed to be valid.
string read/write  $openidVersion
Which OpenID protocol version to try. Default is "1.1". Other possible values are "1.0" and "2.0".
array(string=>mixed) read/write  $requestSource
From where to get the parameters returned by the OpenID provider. Default is $_GET.
string read/write  $returnUrl
URL to return to after the successful authentication by the OpenID provider. Default value is null, in which case the OpenID provider will return to the current URL (the URL that initiated the authentication, from HTTP_HOST + REQUEST_URI server variables).
ezcAuthenticationOpenidStore read/write  $store
The store to use to hold the nonces and (for MODE_SMART) the associations between the server and the OpenID provider. Default is null which means nonces are not used. If you enable MODE_SMART you have to specify also a valid store.
int read/write  $timeout
The amount of seconds allowed as timeout for fetching content during HTML or Yadis discovery.
int read/write  $timeoutOpen
The amount of seconds allowed as timeout when creating a connection with fsockopen() for the HTML or Yadis discovery.

Inherited Member Variables

From ezcBaseOptions:
protected  ezcBaseOptions::$properties

Method Summary

public ezcAuthenticationOpenidOptions __construct( [$options = array()] )
Constructs an object with the specified values.

Inherited Methods

From ezcAuthenticationFilterOptions :
public ezcAuthenticationFilterOptions ezcAuthenticationFilterOptions::__construct()
Constructs an object with the specified values.
From ezcBaseOptions :
public ezcBaseOptions ezcBaseOptions::__construct()
Construct a new options object.
public void ezcBaseOptions::merge()
Merge an array into the actual options object.
public bool ezcBaseOptions::offsetExists()
Returns if an option exists.
public mixed ezcBaseOptions::offsetGet()
Returns an option value.
public void ezcBaseOptions::offsetSet()
Set an option.
public void ezcBaseOptions::offsetUnset()
Unset an option.

Methods

__construct

ezcAuthenticationOpenidOptions __construct( [ $options = array()] )
Constructs an object with the specified values.

Parameters

Name Type Description
$options array(string=>mixed) Options for this class

Throws

ClassDescription
ezcBasePropertyNotFoundException if $options contains a property not defined
ezcBaseValueException if $options contains a property with a value not allowed

Redefinition of

Method Description
ezcAuthenticationFilterOptions::__construct() Constructs an object with the specified values.

Last updated: Mon, 22 Jun 2009