Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit fa59bcc

Browse files
authored
Merge pull request #20 from pajavyskocil/CESNET1
Added function to send AuthnContextClassRef attributes to other modules
2 parents 07f472e + 3e6dc36 commit fa59bcc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Disco.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class sspmod_perun_Disco extends sspmod_discopower_PowerIdPDisco
2222
private $whitelist;
2323
private $greylist;
2424
private $service;
25+
private $authnContextClassRef = array();
2526

2627
public function __construct(array $metadataSets, $instance)
2728
{
@@ -34,6 +35,9 @@ public function __construct(array $metadataSets, $instance)
3435
$this->service = new sspmod_perun_IdpListsServiceCsv();
3536
$this->whitelist = $this->service->listToArray("whitelist");
3637
$this->greylist = $this->service->listToArray("greylist");
38+
if (isset($state['saml:RequestedAuthnContext']['AuthnContextClassRef'])) {
39+
$this->authnContextClassRef = $state['saml:RequestedAuthnContext']['AuthnContextClassRef'];
40+
}
3741
}
3842

3943

@@ -67,6 +71,7 @@ public function handleRequest()
6771
$t->data['entityID'] = $this->spEntityId;
6872
$t->data['return'] = $this->returnURL;
6973
$t->data['returnIDParam'] = $this->returnIdParam;
74+
$t->data['AuthnContextClassRef'] = $this->authnContextClassRef;
7075
$t->show();
7176
}
7277

@@ -212,5 +217,4 @@ public static function buildContinueUrlWithoutIdPEntityId($entityID, $return, $r
212217
return $url;
213218
}
214219

215-
216220
}

0 commit comments

Comments
 (0)