PHP Class Auth_OpenID_GenericConsumer

Instances of it maintain no per-request state, so they can be reused (or even used by multiple threads concurrently) as needed.
显示文件 Open project: openid/php-openid Class Usage Examples

Public Properties

Property Type Description
$_use_assocs
$discoverMethod
$openid1_nonce_query_arg_name
$openid1_return_to_identifier_name 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.
$store This consumer's store object.

Public Methods

Method Description
__construct ( Auth_OpenID_OpenIDStore $store ) This method initializes a new {@link Auth_OpenID_Consumer} instance to access the library.
_checkAuth ( $message, $server_url )
_checkReturnTo ( $message, $return_to )
_checkSetupNeeded ( $message )
_completeInvalid ( $message, $endpoint, $unused )
_complete_cancel ( $message, $endpoint, $unused )
_complete_error ( $message, $endpoint, $unused )
_complete_id_res ( $message, $endpoint, $return_to )
_complete_setup_needed ( $message, $endpoint, $unused )
_createAssociateRequest ( $endpoint, $assoc_type, $session_type )
_createCheckAuthRequest ( $message )
_discoverAndVerify ( $claimed_id, $to_match_endpoints )
_doIdRes ( $message, $endpoint, $return_to )
_extractAssociation ( $assoc_response, $assoc_session )
_extractSupportedAssociationType ( $server_error, $endpoint, $assoc_type ) Handle ServerErrors resulting from association requests.
_getAssociation ( $endpoint )
_getOpenID1SessionType ( $assoc_response ) Given an association response message, extract the OpenID 1.X session type.
_httpResponseToMessage ( $response, $server_url ) Adapt a POST response to a Message.
_idResCheckForFields ( $message )
_idResCheckNonce ( $message, $endpoint )
_idResCheckSignature ( $message, $server_url )
_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.
_makeKVPost ( $message, $server_url )
_negotiateAssociation ( $endpoint )
_processCheckAuthResponse ( $response, $server_url )
_requestAssociation ( $endpoint, $assoc_type, $session_type )
_verifyDiscoveryResults ( $message, $endpoint = null )
_verifyDiscoveryResultsOpenID1 ( $message, $endpoint )
_verifyDiscoveryResultsOpenID2 ( $message, $endpoint )
_verifyDiscoveryServices ( $claimed_id, $services, $to_match_endpoints )
_verifyDiscoverySingle ( $endpoint, $to_match )
_verifyReturnToArgs ( $query )
begin ( $service_endpoint ) Called to begin OpenID authentication using the specified {@link Auth_OpenID_ServiceEndpoint}.
complete ( $message, $endpoint, $return_to ) Given an {@link Auth_OpenID_Message}, {@link Auth_OpenID_ServiceEndpoint} and optional return_to URL, complete OpenID authentication.

Method Details

__construct() public method

This method initializes a new {@link Auth_OpenID_Consumer} instance to access the library.
public __construct ( Auth_OpenID_OpenIDStore $store )
$store Auth_OpenID_OpenIDStore This must be an object that implements the interface in {@link Auth_OpenID_OpenIDStore}. Several concrete implementations are provided, to cover most common use cases. For stores backed by MySQL, PostgreSQL, or SQLite, see the {@link Auth_OpenID_SQLStore} class and its sublcasses. For a filesystem-backed store, see the {@link Auth_OpenID_FileStore} module. As a last resort, if it isn't possible for the server to store state at all, an instance of {@link Auth_OpenID_DumbStore} can be used.

_checkAuth() public method

public _checkAuth ( $message, $server_url )

_checkReturnTo() public method

public _checkReturnTo ( $message, $return_to )

_checkSetupNeeded() public method

public _checkSetupNeeded ( $message )

_completeInvalid() public method

public _completeInvalid ( $message, $endpoint, $unused )

_complete_cancel() public method

public _complete_cancel ( $message, $endpoint, $unused )

_complete_error() public method

public _complete_error ( $message, $endpoint, $unused )

_complete_id_res() public method

public _complete_id_res ( $message, $endpoint, $return_to )

_complete_setup_needed() public method

public _complete_setup_needed ( $message, $endpoint, $unused )

_createAssociateRequest() public method

public _createAssociateRequest ( $endpoint, $assoc_type, $session_type )

_createCheckAuthRequest() public method

public _createCheckAuthRequest ( $message )

_discoverAndVerify() public method

public _discoverAndVerify ( $claimed_id, $to_match_endpoints )

_doIdRes() public method

public _doIdRes ( $message, $endpoint, $return_to )

_extractAssociation() public method

public _extractAssociation ( $assoc_response, $assoc_session )

_extractSupportedAssociationType() public method

Handle ServerErrors resulting from association requests.
public _extractSupportedAssociationType ( $server_error, $endpoint, $assoc_type )

_getAssociation() public method

public _getAssociation ( $endpoint )

_getOpenID1SessionType() public method

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'
public _getOpenID1SessionType ( $assoc_response )

_httpResponseToMessage() static public method

Adapt a POST response to a Message.
static public _httpResponseToMessage ( $response, $server_url )
$response Result of a POST to an OpenID endpoint.

_idResCheckForFields() public method

public _idResCheckForFields ( $message )

_idResCheckNonce() public method

public _idResCheckNonce ( $message, $endpoint )

_idResCheckSignature() public method

public _idResCheckSignature ( $message, $server_url )

_idResGetNonceOpenID1() public method

See the openid1_nonce_query_arg_name class variable
public _idResGetNonceOpenID1 ( $message, $endpoint )

_makeKVPost() public method

public _makeKVPost ( $message, $server_url )

_negotiateAssociation() public method

public _negotiateAssociation ( $endpoint )

_processCheckAuthResponse() public method

public _processCheckAuthResponse ( $response, $server_url )

_requestAssociation() public method

public _requestAssociation ( $endpoint, $assoc_type, $session_type )

_verifyDiscoveryResults() public method

public _verifyDiscoveryResults ( $message, $endpoint = null )

_verifyDiscoveryResultsOpenID1() public method

public _verifyDiscoveryResultsOpenID1 ( $message, $endpoint )

_verifyDiscoveryResultsOpenID2() public method

public _verifyDiscoveryResultsOpenID2 ( $message, $endpoint )

_verifyDiscoveryServices() public method

public _verifyDiscoveryServices ( $claimed_id, $services, $to_match_endpoints )

_verifyDiscoverySingle() public method

public _verifyDiscoverySingle ( $endpoint, $to_match )

_verifyReturnToArgs() public method

public _verifyReturnToArgs ( $query )

begin() public method

Called to begin OpenID authentication using the specified {@link Auth_OpenID_ServiceEndpoint}.
public begin ( $service_endpoint )

complete() public method

Given an {@link Auth_OpenID_Message}, {@link Auth_OpenID_ServiceEndpoint} and optional return_to URL, complete OpenID authentication.
public complete ( $message, $endpoint, $return_to )

Property Details

$_use_assocs public_oe property

public $_use_assocs

$discoverMethod public_oe property

public $discoverMethod

$openid1_nonce_query_arg_name public_oe property

public $openid1_nonce_query_arg_name

$openid1_return_to_identifier_name public_oe property

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.
public $openid1_return_to_identifier_name

$store public_oe property

This consumer's store object.
public $store