ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
linkback.php
Go to the documentation of this file.
1<?php
2
7if (!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
19if ($source === NULL) {
20 throw new SimpleSAML_Error_BadRequest('Could not find authentication source with id ' . var_export($sourceId, TRUE));
21}
22
23try {
24 if (array_key_exists('denied', $_REQUEST)) {
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
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:340
static completeAuth(&$state)
Complete authentication.
Definition: Source.php:136
static throwException($state, SimpleSAML_Error_Exception $exception)
Throw exception to the state exception handler.
Definition: State.php:343
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: Twitter.php:21
const STAGE_INIT
The string used to identify our states.
Definition: Twitter.php:16