TYPO3 CMS  TYPO3_6-2
Auth_OpenID_GenericConsumer Class Reference

Public Member Functions

 Auth_OpenID_GenericConsumer ($store)
 
 begin ($service_endpoint)
 
 complete ($message, $endpoint, $return_to)
 
 _completeInvalid ($message, $endpoint, $unused)
 
 _complete_cancel ($message, $endpoint, $unused)
 
 _complete_error ($message, $endpoint, $unused)
 
 _complete_setup_needed ($message, $endpoint, $unused)
 
 _complete_id_res ($message, $endpoint, $return_to)
 
 _checkSetupNeeded ($message)
 
 _doIdRes ($message, $endpoint, $return_to)
 
 _checkReturnTo ($message, $return_to)
 
 _verifyReturnToArgs ($query)
 
 _idResCheckSignature ($message, $server_url)
 
 _verifyDiscoveryResults ($message, $endpoint=null)
 
 _verifyDiscoveryResultsOpenID1 ($message, $endpoint)
 
 _verifyDiscoverySingle ($endpoint, $to_match)
 
 _verifyDiscoveryResultsOpenID2 ($message, $endpoint)
 
 _discoverAndVerify ($claimed_id, $to_match_endpoints)
 
 _verifyDiscoveryServices ($claimed_id, $services, $to_match_endpoints)
 
 _idResGetNonceOpenID1 ($message, $endpoint)
 
 _idResCheckNonce ($message, $endpoint)
 
 _idResCheckForFields ($message)
 
 _checkAuth ($message, $server_url)
 
 _createCheckAuthRequest ($message)
 
 _processCheckAuthResponse ($response, $server_url)
 
 _makeKVPost ($message, $server_url)
 
 _getAssociation ($endpoint)
 
 _extractSupportedAssociationType ($server_error, $endpoint, $assoc_type)
 
 _negotiateAssociation ($endpoint)
 
 _requestAssociation ($endpoint, $assoc_type, $session_type)
 
 _extractAssociation ($assoc_response, $assoc_session)
 
 _createAssociateRequest ($endpoint, $assoc_type, $session_type)
 
 _getOpenID1SessionType ($assoc_response)
 

Static Public Member Functions

static _httpResponseToMessage ($response, $server_url)
 

Public Attributes

 $discoverMethod = 'Auth_OpenID_discover'
 
 $store
 
 $_use_assocs
 
 $openid1_nonce_query_arg_name = 'janrain_nonce'
 
 $openid1_return_to_identifier_name = 'openid1_claimed_id'
 

Detailed Description

Definition at line 568 of file Consumer.php.

Member Function Documentation

◆ _checkAuth()

Auth_OpenID_GenericConsumer::_checkAuth (   $message,
  $server_url 
)

private

Definition at line 1343 of file Consumer.php.

◆ _checkReturnTo()

Auth_OpenID_GenericConsumer::_checkReturnTo (   $message,
  $return_to 
)

◆ _checkSetupNeeded()

Auth_OpenID_GenericConsumer::_checkSetupNeeded (   $message)

private

Definition at line 741 of file Consumer.php.

References Auth_OpenID_OPENID1_NS.

◆ _complete_cancel()

Auth_OpenID_GenericConsumer::_complete_cancel (   $message,
  $endpoint,
  $unused 
)

private

Definition at line 690 of file Consumer.php.

◆ _complete_error()

Auth_OpenID_GenericConsumer::_complete_error (   $message,
  $endpoint,
  $unused 
)

private

Definition at line 698 of file Consumer.php.

References Auth_OpenID_OPENID_NS.

◆ _complete_id_res()

Auth_OpenID_GenericConsumer::_complete_id_res (   $message,
  $endpoint,
  $return_to 
)

private

Definition at line 725 of file Consumer.php.

References Auth_OpenID_OPENID1_NS.

◆ _complete_setup_needed()

Auth_OpenID_GenericConsumer::_complete_setup_needed (   $message,
  $endpoint,
  $unused 
)

private

Definition at line 711 of file Consumer.php.

References Auth_OpenID_OPENID2_NS.

◆ _completeInvalid()

Auth_OpenID_GenericConsumer::_completeInvalid (   $message,
  $endpoint,
  $unused 
)

private

Definition at line 678 of file Consumer.php.

References Auth_OpenID_OPENID_NS.

◆ _createAssociateRequest()

Auth_OpenID_GenericConsumer::_createAssociateRequest (   $endpoint,
  $assoc_type,
  $session_type 
)

private

Definition at line 1670 of file Consumer.php.

References Auth_OpenID_OPENID2_NS, and Auth_OpenID_Message\fromOpenIDArgs().

◆ _createCheckAuthRequest()

Auth_OpenID_GenericConsumer::_createCheckAuthRequest (   $message)

private

Definition at line 1362 of file Consumer.php.

References Auth_OpenID_OPENID_NS.

◆ _discoverAndVerify()

Auth_OpenID_GenericConsumer::_discoverAndVerify (   $claimed_id,
  $to_match_endpoints 
)

private

Definition at line 1186 of file Consumer.php.

◆ _doIdRes()

Auth_OpenID_GenericConsumer::_doIdRes (   $message,
  $endpoint,
  $return_to 
)

◆ _extractAssociation()

Auth_OpenID_GenericConsumer::_extractAssociation (   $assoc_response,
  $assoc_session 
)

◆ _extractSupportedAssociationType()

Auth_OpenID_GenericConsumer::_extractSupportedAssociationType (   $server_error,
  $endpoint,
  $assoc_type 
)

Handle ServerErrors resulting from association requests.

Returns
$result If server replied with an C{unsupported-type} error, return a tuple of supported C{association_type}, C{session_type}. Otherwise logs the error and returns null.

private

Definition at line 1473 of file Consumer.php.

References Auth_OpenID_OPENID_NS.

◆ _getAssociation()

Auth_OpenID_GenericConsumer::_getAssociation (   $endpoint)

private

Definition at line 1442 of file Consumer.php.

◆ _getOpenID1SessionType()

Auth_OpenID_GenericConsumer::_getOpenID1SessionType (   $assoc_response)

Given an association response message, extract the OpenID 1.X session type.

This function mostly takes care of the 'no-encryption' default behavior in OpenID 1.

If the association type is plain-text, this function will return 'no-encryption'

private

Returns
$typ The association type for this message

Definition at line 1717 of file Consumer.php.

References Auth_OpenID_OPENID1_NS.

◆ _httpResponseToMessage()

static Auth_OpenID_GenericConsumer::_httpResponseToMessage (   $response,
  $server_url 
)
static

Adapt a POST response to a Message.

Parameters
$responseResult of a POST to an OpenID endpoint.

private

Definition at line 1409 of file Consumer.php.

References Auth_OpenID_Message\fromKVForm(), and Auth_OpenID_ServerErrorContainer\fromMessage().

◆ _idResCheckForFields()

Auth_OpenID_GenericConsumer::_idResCheckForFields (   $message)

◆ _idResCheckNonce()

Auth_OpenID_GenericConsumer::_idResCheckNonce (   $message,
  $endpoint 
)

private

Definition at line 1252 of file Consumer.php.

References Auth_OpenID_OPENID2_NS, and Auth_OpenID_splitNonce().

◆ _idResCheckSignature()

Auth_OpenID_GenericConsumer::_idResCheckSignature (   $message,
  $server_url 
)

private

Definition at line 940 of file Consumer.php.

References Auth_OpenID_OPENID_NS, and Auth_OpenID\isFailure().

◆ _idResGetNonceOpenID1()

Auth_OpenID_GenericConsumer::_idResGetNonceOpenID1 (   $message,
  $endpoint 
)

Extract the nonce from an OpenID 1 response. Return the nonce from the BARE_NS since we independently check the return_to arguments are the same as those in the response message.

See the openid1_nonce_query_arg_name class variable

Returns
$nonce The nonce as a string or null

private

Definition at line 1243 of file Consumer.php.

References Auth_OpenID_BARE_NS.

◆ _makeKVPost()

Auth_OpenID_GenericConsumer::_makeKVPost (   $message,
  $server_url 
)

private

Definition at line 1427 of file Consumer.php.

◆ _negotiateAssociation()

Auth_OpenID_GenericConsumer::_negotiateAssociation (   $endpoint)

private

Definition at line 1508 of file Consumer.php.

References Auth_OpenID\isFailure().

◆ _processCheckAuthResponse()

Auth_OpenID_GenericConsumer::_processCheckAuthResponse (   $response,
  $server_url 
)

private

Definition at line 1382 of file Consumer.php.

References Auth_OpenID_OPENID_NS.

◆ _requestAssociation()

Auth_OpenID_GenericConsumer::_requestAssociation (   $endpoint,
  $assoc_type,
  $session_type 
)

private

Definition at line 1557 of file Consumer.php.

◆ _verifyDiscoveryResults()

Auth_OpenID_GenericConsumer::_verifyDiscoveryResults (   $message,
  $endpoint = null 
)

private

Definition at line 987 of file Consumer.php.

References Auth_OpenID_OPENID2_NS.

◆ _verifyDiscoveryResultsOpenID1()

Auth_OpenID_GenericConsumer::_verifyDiscoveryResultsOpenID1 (   $message,
  $endpoint 
)

◆ _verifyDiscoveryResultsOpenID2()

Auth_OpenID_GenericConsumer::_verifyDiscoveryResultsOpenID2 (   $message,
  $endpoint 
)

◆ _verifyDiscoveryServices()

Auth_OpenID_GenericConsumer::_verifyDiscoveryServices (   $claimed_id,
  $services,
  $to_match_endpoints 
)

private

Definition at line 1208 of file Consumer.php.

References $result, and Auth_OpenID\isFailure().

◆ _verifyDiscoverySingle()

Auth_OpenID_GenericConsumer::_verifyDiscoverySingle (   $endpoint,
  $to_match 
)

private

Definition at line 1058 of file Consumer.php.

References Auth_OpenID_OPENID1_NS, and Auth_OpenID\urldefrag().

◆ _verifyReturnToArgs()

Auth_OpenID_GenericConsumer::_verifyReturnToArgs (   $query)

◆ Auth_OpenID_GenericConsumer()

Auth_OpenID_GenericConsumer::Auth_OpenID_GenericConsumer (   $store)

This method initializes a new Auth_OpenID_Consumer instance to access the library.

Parameters
Auth_OpenID_OpenIDStore$storeThis must be an object that implements the interface in Auth_OpenID_OpenIDStore. Several concrete implementations are provided, to cover most common use cases. For stores backed by MySQL, PostgreSQL, or SQLite, see the Auth_OpenID_SQLStore class and its sublcasses. For a filesystem-backed store, see the Auth_OpenID_FileStore module. As a last resort, if it isn't possible for the server to store state at all, an instance of Auth_OpenID_DumbStore can be used.
bool$immediateThis is an optional boolean value. It controls whether the library uses immediate mode, as explained in the module description. The default value is False, which disables immediate mode.

Definition at line 614 of file Consumer.php.

References Auth_OpenID_getAvailableSessionTypes(), Auth_OpenID_getDefaultNegotiator(), and Auth_Yadis_Yadis\getHTTPFetcher().

◆ begin()

Auth_OpenID_GenericConsumer::begin (   $service_endpoint)

Called to begin OpenID authentication using the specified Auth_OpenID_ServiceEndpoint.

private

Definition at line 634 of file Consumer.php.

References Auth_OpenID_mkNonce().

◆ complete()

Auth_OpenID_GenericConsumer::complete (   $message,
  $endpoint,
  $return_to 
)

Given an Auth_OpenID_Message, Auth_OpenID_ServiceEndpoint and optional return_to URL, complete OpenID authentication.

private

Definition at line 656 of file Consumer.php.

References Auth_OpenID\arrayGet(), and Auth_OpenID_OPENID_NS.

Member Data Documentation

◆ $_use_assocs

Auth_OpenID_GenericConsumer::$_use_assocs

private

Definition at line 582 of file Consumer.php.

◆ $discoverMethod

Auth_OpenID_GenericConsumer::$discoverMethod = 'Auth_OpenID_discover'

private

Definition at line 572 of file Consumer.php.

◆ $openid1_nonce_query_arg_name

Auth_OpenID_GenericConsumer::$openid1_nonce_query_arg_name = 'janrain_nonce'

private

Definition at line 587 of file Consumer.php.

◆ $openid1_return_to_identifier_name

Auth_OpenID_GenericConsumer::$openid1_return_to_identifier_name = 'openid1_claimed_id'

Another query parameter that gets added to the return_to for OpenID 1; if the user's session state is lost, use this claimed identifier to do discovery when verifying the response.

Definition at line 594 of file Consumer.php.

◆ $store

Auth_OpenID_GenericConsumer::$store

This consumer's store object.

Definition at line 577 of file Consumer.php.