ILIAS
Release_4_2_x_branch Revision 61807
|
Public Member Functions | |
Auth_OpenID_Consumer ($store, $session=null, $consumer_cls=null) | |
Initialize a Consumer instance. | |
getDiscoveryObject ($session, $openid_url, $session_key_prefix) | |
Used in testing to define the discovery mechanism. | |
begin ($user_url, $anonymous=false) | |
Start the OpenID authentication process. | |
beginWithoutDiscovery ($endpoint, $anonymous=false) | |
Start OpenID verification without doing OpenID server discovery. | |
complete ($current_url, $query=null) | |
Called to interpret the server's response to an OpenID request. |
Data Fields | |
$discoverMethod = 'Auth_OpenID_discover' | |
private | |
$session_key_prefix = "_openid_consumer_" | |
private | |
$_token_suffix = "last_token" | |
private |
Definition at line 215 of file Consumer.php.
Auth_OpenID_Consumer::Auth_OpenID_Consumer | ( | $store, | |
$session = null , |
|||
$consumer_cls = null |
|||
) |
Initialize a Consumer instance.
You should create a new instance of the Consumer object with every HTTP request that handles OpenID transactions.
Auth_OpenID_OpenIDStore | $store | This 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. |
mixed | $session | An object which implements the interface of the Auth_Yadis_PHPSession class. Particularly, this object is expected to have these methods: get($key), set($key), $value), and del($key). This defaults to a session object which wraps PHP's native session machinery. You should only need to pass something here if you have your own sessioning implementation. |
str | $consumer_cls | The name of the class to instantiate when creating the internal consumer object. This is used for testing. |
Definition at line 261 of file Consumer.php.
References $_token_suffix.
Auth_OpenID_Consumer::begin | ( | $user_url, | |
$anonymous = false |
|||
) |
Start the OpenID authentication process.
See steps 1-2 in the overview at the top of this file.
string | $user_url | Identity URL given by the user. This method performs a textual transformation of the URL to try and make sure it is normalized. For example, a user_url of example.com will be normalized to http://example.com/ normalizing and resolving any redirects the server might issue. |
bool | $anonymous | True if the OpenID request is to be sent to the server without any identifier information. Use this when you want to transport data but don't want to do OpenID authentication with identifiers. |
Definition at line 313 of file Consumer.php.
References $loader, beginWithoutDiscovery(), and getDiscoveryObject().
Auth_OpenID_Consumer::beginWithoutDiscovery | ( | $endpoint, | |
$anonymous = false |
|||
) |
Start OpenID verification without doing OpenID server discovery.
This method is used internally by Consumer.begin after discovery is performed, and exists to provide an interface for library users needing to perform their own discovery.
Auth_OpenID_ServiceEndpoint | $endpoint | an OpenID service endpoint descriptor. |
bool | anonymous Set to true if you want to perform OpenID without identifiers. |
Definition at line 373 of file Consumer.php.
References $loader.
Referenced by begin().
Auth_OpenID_Consumer::complete | ( | $current_url, | |
$query = null |
|||
) |
Called to interpret the server's response to an OpenID request.
It is called in step 4 of the flow described in the consumer overview.
string | $current_url | The URL used to invoke the application. Extract the URL from your application's web request framework and specify it here to have it checked against the openid.current_url value in the response. If the current_url URL check fails, the status of the completion will be FAILURE. |
array | $query | An array of the query parameters (key => value pairs) for this HTTP request. Defaults to null. If null, the GET or POST data are automatically gotten from the PHP environment. It is only useful to override $query for testing. |
Definition at line 410 of file Consumer.php.
References $loader, $query, Auth_OpenID_CANCEL, Auth_OpenID_SUCCESS, Auth_OpenID_Message\fromPostArgs(), getDiscoveryObject(), and Auth_OpenID\getQuery().
Auth_OpenID_Consumer::getDiscoveryObject | ( | $session, | |
$openid_url, | |||
$session_key_prefix | |||
) |
Used in testing to define the discovery mechanism.
private
Definition at line 284 of file Consumer.php.
References $session_key_prefix.
Referenced by begin(), and complete().
Auth_OpenID_Consumer::$_token_suffix = "last_token" |
Auth_OpenID_Consumer::$discoverMethod = 'Auth_OpenID_discover' |
private
Definition at line 220 of file Consumer.php.
Auth_OpenID_Consumer::$session_key_prefix = "_openid_consumer_" |