3require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . 
'/oauth/libextinc/OAuth.php');
 
   22    const AUTHID = 
'authlinkedin:AuthId';
 
   37        assert(
'is_array($info)');
 
   38        assert(
'is_array($config)');
 
   43        if (!array_key_exists(
'key', 
$config))
 
   44            throw new Exception(
'LinkedIn authentication source is not properly configured: missing [key]');
 
   48        if (!array_key_exists(
'secret', 
$config))
 
   49            throw new Exception(
'LinkedIn authentication source is not properly configured: missing [secret]');
 
   51        $this->secret = 
$config[
'secret'];
 
   53        if (array_key_exists(
'attributes', 
$config)) {
 
   54            $this->attributes = 
$config[
'attributes'];
 
   57            $this->attributes = 
'id,first-name,last-name,headline,summary,specialties,picture-url,email-address';
 
   70        assert(
'is_array($state)');
 
   82            'https://api.linkedin.com/uas/oauth/requestToken',
 
   83            array(
'oauth_callback' => 
SimpleSAML\Module::getModuleUrl(
'authlinkedin') . 
'/linkback.php?stateid=' . $stateID)
 
   87            "Got a request token from the OAuth service provider [" .
 
  108            "oauth: Using this request token [" .
 
  114            'https://api.linkedin.com/uas/oauth/accessToken', 
$requestToken,
 
  115            array(
'oauth_verifier' => 
$state[
'authlinkedin:oauth_verifier'])
 
  119            "Got an access token from the OAuth service provider [" .
 
  124            'https://api.linkedin.com/v1/people/~:(' . $this->attributes . 
')',
 
  126            array(
'http' => array(
'header' => 
'x-li-format: json'))
 
  170    protected function flatten($array, $prefix = 
'')
 
  173        foreach ($array as 
$key => $value) {
 
  174            if (is_array($value)) {
 
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
An exception for terminatinating execution or to throw for unit testing.
static saveState(&$state, $stage, $rawId=false)
Save the state.
static getStateId(&$state, $rawId=false)
Retrieve the ID of a state array.
const STAGE_INIT
The string used to identify our states.
flatten($array, $prefix='')
takes an associative array, traverses it and returns the keys concatenated with a dot
authenticate(&$state)
Log-in using LinkedIn platform Documentation at: http://developer.linkedin.com/docs/DOC-1008.
const AUTHID
The key of the AuthId field in the state.
__construct($info, $config)
Constructor for this authentication source.
Attribute-related utility methods.