Skip to content

Commit

Permalink
Merge pull request #148 from eurides-eu/master-joel
Browse files Browse the repository at this point in the history
Make email name id configurable
  • Loading branch information
upwebdesign authored Nov 14, 2024
2 parents b31852c + af59bca commit 77a03b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config/samlidp.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use LightSaml\SamlConstants;

return [
/*
|--------------------------------------------------------------------------
Expand All @@ -13,6 +15,8 @@
'debug' => false,
// Define the email address field name in the users table
'email_field' => 'email',
// Define the Name ID for the email field.
'email_name_id'=> SamlConstants::NAME_ID_FORMAT_EMAIL,
// Define the name field in the users table
'name_field' => 'name',
// The URI to your login page
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/SamlSso.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function response()
auth($this->guard)
->user()
->__get(config('samlidp.email_field', 'email')),
SamlConstants::NAME_ID_FORMAT_EMAIL
config('samlidp.email_name_id', SamlConstants::NAME_ID_FORMAT_EMAIL)
)
)
->addSubjectConfirmation(
Expand Down

0 comments on commit 77a03b0

Please sign in to comment.