ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
as_login.php
Go to the documentation of this file.
1<?php
2
9if (!isset($_REQUEST['ReturnTo'])) {
10 throw new SimpleSAML_Error_BadRequest('Missing ReturnTo parameter.');
11}
12
13if (!isset($_REQUEST['AuthId'])) {
14 throw new SimpleSAML_Error_BadRequest('Missing AuthId parameter.');
15}
16
17/*
18 * Setting up the options for the requireAuth() call later..
19 */
20$options = array(
21 'ReturnTo' => \SimpleSAML\Utils\HTTP::checkURLAllowed($_REQUEST['ReturnTo']),
22);
23
24/*
25 * Allows a saml:idp query string parameter specify the IdP entity ID to be used
26 * as used by the DiscoJuice embedded client.
27 */
28if (!empty($_REQUEST['saml:idp'])) {
29 $options['saml:idp'] = $_REQUEST['saml:idp'];
30}
31
32$as = new \SimpleSAML\Auth\Simple($_REQUEST['AuthId']);
33$as->requireAuth($options);
34
if(!empty($_REQUEST['saml:idp'])) $as
Definition: as_login.php:32
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
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
Attribute-related utility methods.