Skip to content

Instantly share code, notes, and snippets.

@scytacki
Created July 17, 2013 15:54
Show Gist options
  • Save scytacki/6021887 to your computer and use it in GitHub Desktop.
Save scytacki/6021887 to your computer and use it in GitHub Desktop.
Drupal OAuthConnector configuration for cross project protal
$provider = new stdClass();
$provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */
$provider->api_version = 1;
$provider->name = 'nextgen_staging_portal';
$provider->title = 'NextGen Staging Portal';
$provider->url = 'http://nextgen.staging.concord.org';
$provider->consumer_advanced = array(
'oauth2' => 1,
'signature method' => 'PLAINTEXT',
'authentication realm' => '',
'request token endpoint' => '/oauth/request_token',
'authorization scope' => 'user',
'authorization endpoint' => '/auth/concord_id/authorize',
'access token endpoint' => '/oauth/token',
);
$provider->mapping = array(
'fields' => array(
'uid' => array(
'resource' => 'http://nextgen.staging.concord.org/auth/concord_id/user.json',
'method post' => 0,
'field' => 'id',
'querypath' => FALSE,
'sync_with_field' => '',
),
'name' => array(
'resource' => 'http://nextgen.staging.concord.org/auth/concord_id/user.json',
'method post' => 0,
'field' => 'info.email',
'querypath' => FALSE,
'sync_with_field' => 'mail',
),
'avatar' => array(
'resource' => '',
'method post' => 0,
'field' => '',
'querypath' => FALSE,
'sync_with_field' => '',
),
),
'format' => 'json',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment