ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
linkback.php
Go to the documentation of this file.
1 <?php
2 
7 if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState'])) {
8  throw new SimpleSAML_Error_BadRequest('Missing state parameter on twitter linkback endpoint.');
9 }
11 
12 // Find authentication source
15 }
17 
19 if ($source === NULL) {
20  throw new SimpleSAML_Error_BadRequest('Could not find authentication source with id ' . var_export($sourceId, TRUE));
21 }
22 
23 try {
24  if (array_key_exists('denied', $_REQUEST)) {
25  throw new SimpleSAML_Error_UserAborted();
26  }
27 
28  $source->finalStep($state);
29 } catch (SimpleSAML_Error_Exception $e) {
31 } catch (Exception $e) {
32  SimpleSAML_Auth_State::throwException($state, new SimpleSAML_Error_AuthSource($sourceId, 'Error on authtwitter linkback endpoint.', $e));
33 }
34 
static throwException($state, SimpleSAML_Error_Exception $exception)
Throw exception to the state exception handler.
Definition: State.php:343
const STAGE_INIT
The string used to identify our states.
Definition: Twitter.php:16
const AUTHID
The key of the AuthId field in the state.
Definition: Twitter.php:21
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
static completeAuth(&$state)
Complete authentication.
Definition: Source.php:135
$source
Definition: linkback.php:22
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:324