ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
Yadis.php File Reference

Go to the source code of this file.

Data Structures

class  Auth_Yadis_DiscoveryResult
 
class  Auth_Yadis_Yadis
 

Namespaces

 OpenID
 This module contains code for dealing with associations between consumers and servers.
 

Functions

 Auth_Yadis_getServiceEndpoints ($input_url, $xrds_parse_func, $discover_func=null, $fetcher=null)
 Perform the Yadis protocol on the input URL and return an iterable of resulting endpoint objects. More...
 

Variables

const Auth_Yadis_CONTENT_TYPE 'application/xrds+xml'
 Need both fetcher types so we can use the right one based on the presence or absence of CURL. More...
 
const Auth_Yadis_HEADER_NAME 'X-XRDS-Location'
 Yadis header. More...
 

Function Documentation

◆ Auth_Yadis_getServiceEndpoints()

Auth_Yadis_getServiceEndpoints (   $input_url,
  $xrds_parse_func,
  $discover_func = null,
  $fetcher = null 
)

Perform the Yadis protocol on the input URL and return an iterable of resulting endpoint objects.

input_url: The URL on which to perform the Yadis protocol

Returns
: The normalized identity URL and an iterable of endpoint objects generated by the filter function.

xrds_parse_func: a callback which will take (uri, xrds_text) and return an array of service endpoint objects or null. Usually array('Auth_OpenID_ServiceEndpoint', 'fromXRDS').

discover_func: if not null, a callback which should take (uri) and return an Auth_Yadis_Yadis object or null.

Definition at line 136 of file Yadis.php.

Referenced by Auth_OpenID_getAllowedReturnURLs().

138 {
139  if ($discover_func === null) {
140  $discover_function = array('Auth_Yadis_Yadis', 'discover');
141  }
142 
143  $yadis_result = call_user_func_array($discover_func,
144  array($input_url, &$fetcher));
145 
146  if ($yadis_result === null) {
147  return array($input_url, array());
148  }
149 
150  $endpoints = call_user_func_array($xrds_parse_func,
151  array($yadis_result->normalized_uri,
152  $yadis_result->response_text));
153 
154  if ($endpoints === null) {
155  $endpoints = array();
156  }
157 
158  return array($yadis_result->normalized_uri, $endpoints);
159 }
+ Here is the caller graph for this function:

Variable Documentation

◆ Auth_Yadis_CONTENT_TYPE

const Auth_Yadis_CONTENT_TYPE 'application/xrds+xml'

Need both fetcher types so we can use the right one based on the presence or absence of CURL.

Need this for parsing HTML (looking for META tags). Need this to parse the XRDS document during Yadis discovery. XRDS (yadis) content type

Definition at line 36 of file Yadis.php.

Referenced by Auth_Yadis_Yadis\discover(), and Auth_Yadis_DiscoveryResult\isXRDS().

◆ Auth_Yadis_HEADER_NAME

const Auth_Yadis_HEADER_NAME 'X-XRDS-Location'

Yadis header.

Definition at line 41 of file Yadis.php.

Referenced by Auth_Yadis_Yadis\discover().