Fix https on simplesaml and remove /login

This commit is contained in:
Peder Bergebakken Sundt 2017-11-11 22:08:24 +01:00
parent 1258b68ef0
commit d18315aa39
3 changed files with 4 additions and 17 deletions

View File

@ -5,7 +5,8 @@
$dataportenConfig = [ $dataportenConfig = [
'client_id' => "", 'client_id' => "",
'client_secret' => "", 'client_secret' => "",
'redirect_uri' => "", //'redirect_uri' => "https://pvv.ntnu.no/paamelding/",
'redirect_uri' => "http://localhost:1080/paamelding/",
'auth' => "https://auth.dataporten.no/oauth/authorization",#Authorization endpoint 'auth' => "https://auth.dataporten.no/oauth/authorization",#Authorization endpoint
'token' => "https://auth.dataporten.no/oauth/token",#Token endpoint 'token' => "https://auth.dataporten.no/oauth/token",#Token endpoint

View File

@ -7,7 +7,7 @@ $metadata['https://www.pvv.ntnu.no/idp'] = array (
0 => 0 =>
array ( array (
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
'Location' => 'http://www.pvv.ntnu.no/idp/saml2/idp/SSOService.php', 'Location' => 'https://www.pvv.ntnu.no/idp/saml2/idp/SSOService.php',
), ),
), ),
'SingleLogoutService' => 'SingleLogoutService' =>
@ -15,7 +15,7 @@ $metadata['https://www.pvv.ntnu.no/idp'] = array (
0 => 0 =>
array ( array (
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
'Location' => 'http://www.pvv.ntnu.no/idp/saml2/idp/SingleLogoutService.php', 'Location' => 'https://www.pvv.ntnu.no/idp/saml2/idp/SingleLogoutService.php',
), ),
), ),
'certData' => 'MIICgDCCAemgAwIBAgIJAP13Q5w2R3KgMA0GCSqGSIb3DQEBBQUAMDUxCzAJBgNVBAYTAk5PMRgwFgYDVQQIFA9Tw7hyLVRyw7huZGVsYWcxDDAKBgNVBAoTA1BWVjAeFw0xNDAzMTMxODIz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Y8wRaHg/fruqicDhodCPq9dF7/+QmYAG8PMKmpCIvnKaT7EjOGQtCnxv2+17CF0c7IuLjlwNZG8m0xDBZZp8ymj6QK+mJfVEahBPbkMaCBGIsCAwEAAaOBlzCBlDAdBgNVHQ4EFgQUNEuP7yZVDneEA4uTfJv/UFA9gjcwZQYDVR0jBF4wXIAUNEuP7yZVDneEA4uTfJv/UFA9gjehOaQ3MDUxCzAJBgNVBAYTAk5PMRgwFgYDVQQIFA9Tw7hyLVRyw7huZGVsYWcxDDAKBgNVBAoTA1BWVoIJAP13Q5w2R3KgMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAg8hx8aRy/Fz9PK9UckOQ92WSoRCyr/ldQSf0OTRTMyG+zsSrzVsDX3+BFWbMAFrEu7SZAakd9FQajTUw0d930iaDP+ptX1uIxb64OOY0glLOW3Ru/CL309JwUIkDADa8drpRK4IFDvzs5nVpaj75X1pp583e+psuNST8f+mLspw=',

View File

@ -1,14 +0,0 @@
<?php
require_once(__DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
$as = new SimpleSAML_Auth_Simple('default-sp');
$as->requireAuth();
$attributes = $as->getAttributes();
?>
<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>