ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Default.php
Go to the documentation of this file.
1<?php
2
15{
16
17
21 public static function initLogin(
22 $authId,
23 $return,
24 $errorURL = null,
25 array $params = array()
26 ) {
27
28 $as = self::getAuthSource($authId);
29 $as->initLogin($return, $errorURL, $params);
30 }
31
32
37 public static function extractPersistentAuthState(array &$state)
38 {
39
41 }
42
43
47 public static function loginCompleted($state)
48 {
50 }
51
52
56 public static function initLogoutReturn($returnURL, $authority)
57 {
58 assert(is_string($returnURL));
59 assert(is_string($authority));
60
62
63 $state = $session->getAuthData($authority, 'LogoutState');
64 $session->doLogout($authority);
65
66 $state['SimpleSAML_Auth_Default.ReturnURL'] = $returnURL;
67 $state['LogoutCompletedHandler'] = array(get_class(), 'logoutCompleted');
68
70 if ($as === null) {
71 // The authority wasn't an authentication source...
73 }
74
75 $as->logout($state);
76 }
77
78
82 public static function initLogout($returnURL, $authority)
83 {
84 assert(is_string($returnURL));
85 assert(is_string($authority));
86
88
90 }
91
92
96 public static function logoutCompleted($state)
97 {
98 assert(is_array($state));
99 assert(array_key_exists('SimpleSAML_Auth_Default.ReturnURL', $state));
100
101 \SimpleSAML\Utils\HTTP::redirectTrustedURL($state['SimpleSAML_Auth_Default.ReturnURL']);
102 }
103
104
108 public static function logoutCallback($state)
109 {
111 }
112
113
118 public static function handleUnsolicitedAuth($authId, array $state, $redirectTo)
119 {
121 }
122
123
131 private static function getAuthSource($id)
132 {
134 if ($as === null) {
135 throw new Exception('Invalid authentication source: ' . $id);
136 }
137 return $as;
138 }
139}
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 redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
Definition: HTTP.php:959
static initLogoutReturn($returnURL, $authority)
Definition: Default.php:56
static initLogout($returnURL, $authority)
Definition: Default.php:82
static handleUnsolicitedAuth($authId, array $state, $redirectTo)
Definition: Default.php:118
static getAuthSource($id)
Return an authentication source by ID.
Definition: Default.php:131
static logoutCallback($state)
Definition: Default.php:108
static extractPersistentAuthState(array &$state)
Definition: Default.php:37
static initLogin( $authId, $return, $errorURL=null, array $params=array())
Definition: Default.php:21
static logoutCompleted($state)
Definition: Default.php:96
static loginCompleted($state)
Definition: Default.php:47
static loginCompleted($state)
Called when a login operation has finished.
Definition: Source.php:212
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:340
static logoutCallback($state)
Called when the authentication source receives an external logout request.
Definition: Source.php:379
static getPersistentAuthData(array $state)
Get the persistent authentication state from the state array.
Definition: State.php:103
static getSessionFromRequest()
Retrieves the current session.
Definition: Session.php:241
static handleUnsolicitedAuth($authId, array $state, $redirectTo)
Handle an unsolicited login operations.
Definition: SP.php:758
$as
$authority
if(!array_key_exists('StateId', $_REQUEST)) $id
$session