ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
linkback.php
Go to the documentation of this file.
1 <?php
2 
7 if (!array_key_exists('stateid', $_REQUEST)) {
8  throw new Exception('Lost OAuth Client State');
9 }
11 
12 // http://developer.linkedin.com/docs/DOC-1008#2_Redirect_the_User_to_our_Authorization_Server
13 if (array_key_exists('oauth_verifier', $_REQUEST)) {
14  $state['authlinkedin:oauth_verifier'] = $_REQUEST['oauth_verifier'];
15 } else {
16  throw new Exception('OAuth verifier not returned.');;
17 }
18 
19 // Find authentication source
22 
24 if ($source === NULL) {
25  throw new Exception('Could not find authentication source with id ' . $sourceId);
26 }
27 
28 $source->finalStep($state);
29 
31 
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
if(!array_key_exists(sspmod_authfacebook_Auth_Source_Facebook::AUTHID, $state)) $sourceId
Definition: linkback.php:20
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
Definition: State.php:259
const AUTHID
The key of the AuthId field in the state.
Definition: LinkedIn.php:22
static completeAuth(&$state)
Complete authentication.
Definition: Source.php:136
$source
Definition: linkback.php:22
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:340
const STAGE_INIT
The string used to identify our states.
Definition: LinkedIn.php:17