Created
July 7, 2011 14:13
-
-
Save voxpelli/1069596 to your computer and use it in GitHub Desktop.
OAuth Connector setup for OAuth Login provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$provider = new stdClass; | |
$provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */ | |
$provider->name = 'sandbox'; | |
$provider->title = 'Sandbox'; | |
$provider->url = 'http://sandbox.local/'; | |
$provider->consumer_advanced = array( | |
'signature method' => 'HMAC-SHA512', | |
'request token endpoint' => '/oauth/request_token', | |
'authorization endpoint' => '/oauth/authorize', | |
'access token endpoint' => '/oauth/access_token', | |
); | |
$provider->mapping = array( | |
'fields' => array( | |
'uid' => array( | |
'resource' => 'http://sandbox.local/oauthlogin/api/user/info', | |
'method post' => 1, | |
'field' => 'uid', | |
), | |
'real name' => array( | |
'resource' => 'http://sandbox.local/oauthlogin/api/user/info', | |
'method post' => 1, | |
'field' => 'name', | |
), | |
'avatar' => array( | |
'resource' => '', | |
'method post' => 0, | |
'field' => '', | |
), | |
), | |
'format' => 'php', | |
); | |
$providers['sandbox'] = $provider; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment