Ejemplo n.º 1
0
/**
 * Add EAUT Mapper server to XRDS document.
 */
function openid_eaut_xrds_simple($xrds)
{
    if (get_option('openid_xrds_eaut')) {
        $xrds = xrds_add_simple_service($xrds, 'Email Address to URL Transformation Mapper', 'http://specs.eaut.org/1.0/mapping', site_url('/') . '?eaut_mapper=1');
    }
    return $xrds;
}
Ejemplo n.º 2
0
/**
 *
 * @uses apply_filters() Calls 'openid_consumer_return_urls' to collect return_to URLs to be included in XRDS document.
 */
function openid_consumer_xrds_simple($xrds)
{
    if (get_option('openid_xrds_returnto')) {
        // OpenID Consumer Service
        $return_urls = array_unique(apply_filters('openid_consumer_return_urls', array()));
        if (!empty($return_urls)) {
            $xrds = xrds_add_simple_service($xrds, 'OpenID Consumer Service', 'http://specs.openid.net/auth/2.0/return_to', $return_urls);
        }
    }
    if (get_option('openid_xrds_idib')) {
        // Identity in the Browser Login Service
        $xrds = xrds_add_service($xrds, 'main', 'Identity in the Browser Login Service', array('Type' => array(array('content' => 'http://specs.openid.net/idib/1.0/login')), 'URI' => array(array('simple:httpMethod' => 'POST', 'content' => site_url('/wp-login.php', 'login_post')))));
        // Identity in the Browser Indicator Service
        $xrds = xrds_add_simple_service($xrds, 'Identity in the Browser Indicator Service', 'http://specs.openid.net/idib/1.0/indicator', site_url('/') . '?openid_check_login');
    }
    return $xrds;
}
Ejemplo n.º 3
0
/**
 *
 * @uses apply_filters() Calls 'openid_consumer_return_urls' to collect return_to URLs to be included in XRDS document.
 */
function openid_consumer_xrds_simple($xrds)
{
    if (get_option('openid_xrds_returnto')) {
        // OpenID Consumer Service
        $return_urls = array_unique(apply_filters('openid_consumer_return_urls', array(openid_service_url('consumer', 'login_post'))));
        if (!empty($return_urls)) {
            $xrds = xrds_add_simple_service($xrds, 'OpenID Consumer Service', 'http://specs.openid.net/auth/2.0/return_to', $return_urls);
        }
    }
    return $xrds;
}
Ejemplo n.º 4
0
/**
 *
 * @uses apply_filters() Calls 'openid_consumer_return_urls' to collect return_to URLs to be included in XRDS document.
 */
function openid_consumer_xrds_simple($xrds)
{
    if (get_option('openid_xrds_returnto')) {
        // OpenID Consumer Service
        $return_urls = array_unique(apply_filters('openid_consumer_return_urls', array(openid_service_url('consumer', 'login_post'))));
        if (!empty($return_urls)) {
            // fixes https://github.com/diso/wordpress-xrds-simple/issues/4
            unset($xrds['main']['type']);
            $xrds = xrds_add_simple_service($xrds, 'OpenID Consumer Service', 'http://specs.openid.net/auth/2.0/return_to', $return_urls);
        }
    }
    return $xrds;
}