You are here

function services_oauth_xrds in OAuth 1.0 6.3

Same name and namespace in other branches
  1. 7.4 oauth_common.module \services_oauth_xrds()
  2. 7.3 oauth_common.module \services_oauth_xrds()

Implementation of hook_xrds().

File

./oauth_common.module, line 254

Code

function services_oauth_xrds() {
  $xrds = array();
  $xrds['oauth'] = array(
    'services' => array(
      array(
        'data' => array(
          'Type' => array(
            'http://oauth.net/discovery/1.0',
          ),
          'URI' => array(
            '#main',
          ),
        ),
      ),
      array(
        'data' => array(
          'Type' => array(
            'http://oauth.net/core/1.0/endpoint/request',
            'http://oauth.net/core/1.0/parameters/auth-header',
            'http://oauth.net/core/1.0/parameters/uri-query',
            'http://oauth.net/core/1.0/signature/HMAC-SHA1',
          ),
          'URI' => array(
            url('oauth/request_token', array(
              'absolute' => TRUE,
            )),
          ),
        ),
      ),
      array(
        'data' => array(
          'Type' => array(
            'http://oauth.net/core/1.0/endpoint/authorize',
            'http://oauth.net/core/1.0/parameters/uri-query',
          ),
          'URI' => array(
            url('oauth/authorize', array(
              'absolute' => TRUE,
            )),
          ),
        ),
      ),
      array(
        'data' => array(
          'Type' => array(
            'http://oauth.net/core/1.0/endpoint/access',
            'http://oauth.net/core/1.0/parameters/auth-header',
            'http://oauth.net/core/1.0/parameters/uri-query',
            'http://oauth.net/core/1.0/signature/HMAC-SHA1',
          ),
          'URI' => array(
            url('oauth/access_token', array(
              'absolute' => TRUE,
            )),
          ),
        ),
      ),
    ),
  );
  return $xrds;
}