Class OpenID

Description

OpenID

Base OpenID class. Contains common constants and helper static methods, as well as the directRequest() method, which handles direct communications. It also is a common place to assign your custom Storage class and Observers.

Located in /OpenID.php (line 40)


	
			
Direct descendents
Class Description
OpenID_Assertion Class for verifying assertions. Does basic validation (nonce, return_to, etc), as well as signature verification and check_authentication.
OpenID_Association_Request OpenID_Association_Request
OpenID_RelyingParty OpenID_RelyingParty
Class Constant Summary
 ASSOC_TYPE_HMAC_SHA1 = 'HMAC-SHA1'
 ASSOC_TYPE_HMAC_SHA256 = 'HMAC-SHA256'
 HASH_ALGORITHM_2_0 = 'SHA256'
 MODE_ASSOCIATE = 'associate'
 MODE_CANCEL = 'cancel'
 MODE_CHECKID_IMMEDIATE = 'checkid_immediate'
 MODE_CHECKID_SETUP = 'checkid_setup'
 MODE_CHECK_AUTHENTICATION = 'check_authentication'
 MODE_ERROR = 'error'
 MODE_ID_RES = 'id_res'
 MODE_SETUP_NEEDED = 'setup_needed'
 NS_1_1 = 'http://openid.net/signon/1.1'
 NS_2_0 = 'http://specs.openid.net/auth/2.0'
 NS_2_0_ID_SELECT = 'http://specs.openid.net/auth/2.0/identifier_select'
 SERVICE_1_0_SIGNON = 'http://openid.net/signon/1.0'
 SERVICE_1_1_SIGNON = 'http://openid.net/signon/1.1'
 SERVICE_2_0_SERVER = 'http://specs.openid.net/auth/2.0/server'
 SERVICE_2_0_SIGNON = 'http://specs.openid.net/auth/2.0/signon'
 SESSION_TYPE_DH_SHA1 = 'DH-SHA1'
 SESSION_TYPE_DH_SHA256 = 'DH-SHA256'
 SESSION_TYPE_NO_ENCRYPTION = 'no-encryption'
Variable Summary
static $lastEvent $lastEvent
static $observers $observers
static $store $store
static $versionMap $versionMap
Method Summary
static void attach (OpenID_Observer_Common $observer)
static void detach (OpenID_Observer_Common $observer)
static void getLastEvent ()
static void getXRIGlobalSymbols ()
static string normalizeIdentifier (mixed $identifier)
static void notify ()
static void setLastEvent (string $name, mixed $data)
static void setStore (OpenID_Store_Interface $store)
HTTP_Request2_Response directRequest (string $url, OpenID_Message $message, [ $options = array()])
HTTP_Request2_Response getHTTPRequest2Instance ()
Variables
static $lastEvent $lastEvent = array(
'name' => 'start',
'data' => null
)
(line 116)

Stores the last event

  • access: protected
static $observers $observers = array() (line 109)

Array of attached observers

  • access: protected
static $store $store = null (line 102)

Instance of OpenID_Store_Interface

static $versionMap $versionMap = array(
self::SERVICE_2_0_SERVER => self::NS_2_0,
self::SERVICE_2_0_SIGNON => self::NS_2_0,
self::SERVICE_1_1_SIGNON => self::NS_1_1,
self::SERVICE_1_0_SIGNON => self::NS_1_1,
)
(line 61)

A map of which service types (versions) map to which protocol version. 1.0 is mapped to 1.1. This is mostly helpful to see if openid.ns is supported.

  • access: public
Methods
static method attach (line 129)

Attaches an observer

static void attach (OpenID_Observer_Common $observer)
static method detach (line 146)

Detaches the observer

  • access: public
static void detach (OpenID_Observer_Common $observer)
static method getLastEvent (line 190)

Gets the last event

  • access: public
static void getLastEvent ()
static method getStore (line 213)

Gets the OpenID_Store_Interface instance. If none has been set, then the default store is used (CacheLite).

  • access: public
static OpenID_Store_Interface getStore ()
static method getXRIGlobalSymbols (line 270)

Returns an array of the 5 XRI globals symbols

  • access: public
static void getXRIGlobalSymbols ()
static method normalizeIdentifier (line 283)

Normalizes an identifier (URI or XRI)

  • return: Normalized Identifier.
  • throws: OpenID_Exception on invalid identifier
  • access: public
static string normalizeIdentifier (mixed $identifier)
  • mixed $identifier: URI or XRI to be normalized
static method notify (line 161)

Notifies all observers of an event

  • access: public
static void notify ()
static method setLastEvent (line 176)

Sets the last event and notifies the observers

  • access: public
static void setLastEvent (string $name, mixed $data)
  • string $name: Name of the event
  • mixed $data: The event's data
static method setStore (line 202)

Sets a custom OpenID_Store_Interface object

  • access: public
static void setStore (OpenID_Store_Interface $store)
directRequest (line 233)

Sends a direct HTTP request.

HTTP_Request2_Response directRequest (string $url, OpenID_Message $message, [ $options = array()])
  • string $url: URL to send the request to
  • OpenID_Message $message: Contains message contents
  • array $options: Options to pass to HTTP_Request2
getHTTPRequest2Instance (line 256)

Instantiates HTTP_Request2. Abstracted for testing.

HTTP_Request2_Response getHTTPRequest2Instance ()
Class Constants
ASSOC_TYPE_HMAC_SHA1 = 'HMAC-SHA1' (line 93)
ASSOC_TYPE_HMAC_SHA256 = 'HMAC-SHA256' (line 94)
HASH_ALGORITHM_1_1 = 'SHA1' (line 72)
HASH_ALGORITHM_2_0 = 'SHA256' (line 71)

Supported Association Hash Algorithms (preferred)

MODE_ASSOCIATE = 'associate' (line 77)

OpenID Modes

MODE_CANCEL = 'cancel' (line 82)
MODE_CHECKID_IMMEDIATE = 'checkid_immediate' (line 79)
MODE_CHECKID_SETUP = 'checkid_setup' (line 78)
MODE_CHECK_AUTHENTICATION = 'check_authentication' (line 80)
MODE_ERROR = 'error' (line 84)
MODE_ID_RES = 'id_res' (line 81)
MODE_SETUP_NEEDED = 'setup_needed' (line 83)
NS_1_1 = 'http://openid.net/signon/1.1' (line 46)
NS_2_0 = 'http://specs.openid.net/auth/2.0' (line 45)

OP identifier constants

NS_2_0_ID_SELECT = 'http://specs.openid.net/auth/2.0/identifier_select' (line 48)
SERVICE_1_0_SIGNON = 'http://openid.net/signon/1.0' (line 53)
SERVICE_1_1_SIGNON = 'http://openid.net/signon/1.1' (line 52)
SERVICE_2_0_SERVER = 'http://specs.openid.net/auth/2.0/server' (line 50)
SERVICE_2_0_SIGNON = 'http://specs.openid.net/auth/2.0/signon' (line 51)
SESSION_TYPE_DH_SHA1 = 'DH-SHA1' (line 90)
SESSION_TYPE_DH_SHA256 = 'DH-SHA256' (line 91)
SESSION_TYPE_NO_ENCRYPTION = 'no-encryption' (line 89)

Documentation generated on Tue, 15 Dec 2009 19:00:56 -0800 by phpDocumentor 1.4.3