ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Default.php
Go to the documentation of this file.
1 <?php
2 
15 
16 
20  public static function initLogin($authId, $return, $errorURL = NULL,
21  array $params = array()) {
22 
23  $as = self::getAuthSource($authId);
24  $as->initLogin($return, $errorURL, $params);
25  }
26 
27 
32  public static function extractPersistentAuthState(array &$state) {
33 
35  }
36 
37 
41  public static function loginCompleted($state) {
43  }
44 
45 
49  public static function initLogoutReturn($returnURL, $authority) {
50  assert('is_string($returnURL)');
51  assert('is_string($authority)');
52 
54 
55  $state = $session->getAuthData($authority, 'LogoutState');
56  $session->doLogout($authority);
57 
58  $state['SimpleSAML_Auth_Default.ReturnURL'] = $returnURL;
59  $state['LogoutCompletedHandler'] = array(get_class(), 'logoutCompleted');
60 
62  if ($as === NULL) {
63  // The authority wasn't an authentication source...
64  self::logoutCompleted($state);
65  }
66 
67  $as->logout($state);
68  }
69 
70 
74  public static function initLogout($returnURL, $authority) {
75  assert('is_string($returnURL)');
76  assert('is_string($authority)');
77 
78  self::initLogoutReturn($returnURL, $authority);
79 
81  }
82 
83 
87  public static function logoutCompleted($state) {
88  assert('is_array($state)');
89  assert('array_key_exists("SimpleSAML_Auth_Default.ReturnURL", $state)');
90 
91  \SimpleSAML\Utils\HTTP::redirectTrustedURL($state['SimpleSAML_Auth_Default.ReturnURL']);
92  }
93 
94 
98  public static function logoutCallback($state) {
100  }
101 
102 
107  public static function handleUnsolicitedAuth($authId, array $state, $redirectTo) {
108  sspmod_saml_Auth_Source_SP::handleUnsolicitedAuth($authId, $state, $redirectTo);
109  }
110 
111 
119  private static function getAuthSource($id) {
121  if ($as === null) {
122  throw new Exception('Invalid authentication source: ' . $id);
123  }
124  return $as;
125  }
126 }
$params
Definition: disable.php:11
static initLogin($authId, $return, $errorURL=NULL, array $params=array())
Definition: Default.php:20
static handleUnsolicitedAuth($authId, array $state, $redirectTo)
Definition: Default.php:107
static logoutCompleted($state)
Definition: Default.php:87
$session
static loginCompleted($state)
Called when a login operation has finished.
Definition: Source.php:211
if(!array_key_exists('StateId', $_REQUEST)) $id
static initLogoutReturn($returnURL, $authority)
Definition: Default.php:49
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
Definition: HTTP.php:962
static logoutCallback($state)
Called when the authentication source receives an external logout request.
Definition: Source.php:363
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
static extractPersistentAuthState(array &$state)
Definition: Default.php:32
static logoutCallback($state)
Definition: Default.php:98
static getAuthSource($id)
Return an authentication source by ID.
Definition: Default.php:119
$as
static loginCompleted($state)
Definition: Default.php:41
Create styles array
The data for the language used.
static getPersistentAuthData(array $state)
Get the persistent authentication state from the state array.
Definition: State.php:103
static handleUnsolicitedAuth($authId, array $state, $redirectTo)
Handle an unsolicited login operations.
Definition: SP.php:749
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:324
$authority
static getSessionFromRequest()
Retrieves the current session.
Definition: Session.php:243
static initLogout($returnURL, $authority)
Definition: Default.php:74