ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
linkback.php
Go to the documentation of this file.
1<?php
2
7if (!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
13if (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
20assert('array_key_exists(sspmod_authlinkedin_Auth_Source_LinkedIn::AUTHID, $state)');
22
24if ($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(sspmod_authfacebook_Auth_Source_Facebook::AUTHID, $state)) $sourceId
Definition: linkback.php:20
$source
Definition: linkback.php:22
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
An exception for terminatinating execution or to throw for unit testing.
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:324
static completeAuth(&$state)
Complete authentication.
Definition: Source.php:135
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
Definition: State.php:259
const STAGE_INIT
The string used to identify our states.
Definition: LinkedIn.php:17
const AUTHID
The key of the AuthId field in the state.
Definition: LinkedIn.php:22