Fixed logout
This commit is contained in:
parent
d047a99fd3
commit
731663e4c0
3
dev.sh
3
dev.sh
@ -7,7 +7,8 @@ if test \! -d vendor; then
|
||||
composer install
|
||||
cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
|
||||
cp -v dist/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
|
||||
cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
|
||||
# cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
|
||||
sed -e "s/'trusted.url.domains' => array()/'trusted.url.domains' => array('localhost:1080')/g" < vendor/simplesamlphp/simplesamlphp/config-templates/config.php > vendor/simplesamlphp/simplesamlphp/config/config.php
|
||||
ln -s ../vendor/simplesamlphp/simplesamlphp/www/ www/simplesaml
|
||||
fi
|
||||
|
||||
|
@ -2,9 +2,13 @@
|
||||
require_once(__DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
|
||||
$as = new SimpleSAML_Auth_Simple('default-sp');
|
||||
$as->requireAuth();
|
||||
|
||||
$attributes = $as->getAttributes();
|
||||
print_r($attributes);
|
||||
?>
|
||||
|
||||
test
|
||||
<p>
|
||||
Username: <?= $attributes["uid"][0]?><br>
|
||||
Full name: <?= $attributes["cn"][0]?><br>
|
||||
Email: <?= $attributes["mail"][0]?><br>
|
||||
</p>
|
||||
|
||||
<a href="<?= htmlspecialchars($as->getLogoutURL("http://localhost:1080/")) ?>">logout</a>
|
||||
|
Loading…
Reference in New Issue
Block a user