Skip to content

Commit 0fafc59

Browse files
authored
Merge pull request #161 from PDERAS/feature/59-use-config-for-authn-context
use config for authn context
2 parents 267044b + c1982fd commit 0fafc59

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/samlidp.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
'encrypt_assertion' => true,
3838
// Make sure messages are signed
3939
'messages_signed' => true,
40-
// Defind what digital algorithm you want to use
40+
// Define what digital algorithm you want to use
4141
'digest_algorithm' => \RobRichards\XMLSecLibs\XMLSecurityDSig::SHA1,
42+
// Auth Context to send with the assertion
43+
'authn_context' => SamlConstants::NAME_ID_FORMAT_UNSPECIFIED,
4244
// list of all service providers
4345
'sp' => [
4446
// Base64 encoded ACS URL

src/Jobs/SamlSso.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function response()
122122
->setAuthnInstant(new \DateTime('-10 MINUTE'))
123123
->setSessionIndex(Helper::generateID())
124124
->setAuthnContext(
125-
(new AuthnContext)->setAuthnContextClassRef(SamlConstants::NAME_ID_FORMAT_UNSPECIFIED)
125+
(new AuthnContext)->setAuthnContextClassRef(config('samlidp.authn_context', SamlConstants::NAME_ID_FORMAT_UNSPECIFIED))
126126
)
127127
);
128128

0 commit comments

Comments
 (0)