Auth_Yadis_Discovery
in package
State management for discovery.
High-level usage pattern is to call .getNextService(discover) in order to find the next available service for this user for this session. Once a request completes, call .cleanup() to clean up the session state.
Table of Contents
- $DEFAULT_SUFFIX : mixed
- $PREFIX : mixed
- __construct() : mixed
- Initialize a discovery object.
- cleanup() : null|Auth_OpenID_ServiceEndpoint
- Clean up Yadis-related services in the session and return the most-recently-attempted service from the manager, if one exists.
- createManager() : Auth_Yadis_Manager|null
- destroyManager() : mixed
- getManager() : null|Auth_Yadis_Manager
- getNextService() : null|Auth_OpenID_ServiceEndpoint
- Return the next authentication service for the pair of user_input and session. This function handles fallback.
- getSessionKey() : mixed
Properties
$DEFAULT_SUFFIX
public
mixed
$DEFAULT_SUFFIX
= 'auth'
Tags
$PREFIX
public
mixed
$PREFIX
= '_yadis_services_'
Tags
Methods
__construct()
Initialize a discovery object.
public
__construct(Auth_Yadis_PHPSession $session, string $url[, string $session_key_suffix = null ]) : mixed
Parameters
- $session : Auth_Yadis_PHPSession
-
An object which implements the Auth_Yadis_PHPSession API.
- $url : string
-
The URL on which to attempt discovery.
- $session_key_suffix : string = null
-
The optional session key suffix override.
Return values
mixed —cleanup()
Clean up Yadis-related services in the session and return the most-recently-attempted service from the manager, if one exists.
public
cleanup([bool $force = false ]) : null|Auth_OpenID_ServiceEndpoint
Parameters
- $force : bool = false
-
True if the manager should be deleted regardless of whether it's a manager for $this->url.
Return values
null|Auth_OpenID_ServiceEndpoint —createManager()
public
createManager(array<string|int, mixed> $services[, null|string $yadis_url = null ]) : Auth_Yadis_Manager|null
Parameters
- $services : array<string|int, mixed>
- $yadis_url : null|string = null
Tags
Return values
Auth_Yadis_Manager|null —destroyManager()
public
destroyManager([bool $force = false ]) : mixed
Parameters
- $force : bool = false
-
True if the manager should be deleted regardless of whether it's a manager for $this->url.
Tags
Return values
mixed —getManager()
public
getManager([bool $force = false ]) : null|Auth_Yadis_Manager
Parameters
- $force : bool = false
-
True if the manager should be returned regardless of whether it's a manager for $this->url.
Tags
Return values
null|Auth_Yadis_Manager —getNextService()
Return the next authentication service for the pair of user_input and session. This function handles fallback.
public
getNextService(callable $discover_cb, object $fetcher) : null|Auth_OpenID_ServiceEndpoint
Parameters
- $discover_cb : callable
- $fetcher : object
Return values
null|Auth_OpenID_ServiceEndpoint —getSessionKey()
public
getSessionKey() : mixed