Skip to content

Commit cc8cd6f

Browse files
committed
Update doc example for roles retrieval
1 parent f6c1f5d commit cc8cd6f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ So in a X.Y.Z version:
3131
- X - major SimpleSAMLphp version
3232
- Y - major Drupal version
3333
- Z - inthis module incremental version
34-
34+
3535
Example: for SimpleSAMLphp version 1.15.4 with Drupal version 8.5.6 and this module version 1 we will have tag 1.8.1. Same thing for Drupal 7 will be 1.7.1.
3636

3737
`master` at the moment corresponds to 1.8.*. Branch `1.7` is respectfully for Drupal 7 (not composer integration yet).
@@ -41,7 +41,7 @@ Example: for SimpleSAMLphp version 1.15.4 with Drupal version 8.5.6 and this mod
4141
### Requirements
4242

4343
1. Install Drupal 8.x
44-
2. Install simpleSAMLphp
44+
2. Install simpleSAMLphp
4545
3. Install drupalauth
4646
4. Configure SimpleSAMLphp to use something other than `phpsession` for session storage, e.g., SQL or memcache (See: `store.type` in `simplesamlphp/config/config.php`).
4747
5. Configure the authentication source in `simplesamlphp/config/authsources.php` as described below.
@@ -58,7 +58,7 @@ Configure the authentication source by putting following code into `simplesamlph
5858
'drupal-userpass' => array(
5959
'drupalauth:UserPass',
6060

61-
// The filesystem path of the Drupal directory.
61+
// The filesystem path of the Drupal directory.
6262
'drupalroot' => '/var/www/drupal-8.0',
6363

6464
// Whether to turn on debug
@@ -67,7 +67,7 @@ Configure the authentication source by putting following code into `simplesamlph
6767
// Which attributes should be retrieved from the Drupal site.
6868
'attributes' => array(
6969
array('field_name' => 'uid', 'attribute_name' => 'uid'),
70-
array('field_name' => 'roles', 'attribute_name' => 'roles'),
70+
array('field_name' => 'roles', 'attribute_name' => 'roles', 'field_property' => 'target_id'),
7171
array('field_name' => 'name', 'attribute_name' => 'cn'),
7272
array('field_name' => 'mail', 'attribute_name' => 'mail'),
7373
array('field_name' => 'field_first_name', 'attribute_name' => 'givenName'),
@@ -105,7 +105,7 @@ Configure the authentication source by putting following code into `simplesamlph
105105
// Which attributes should be retrieved from the Drupal site.
106106
'attributes' => array(
107107
array('field_name' => 'uid', 'attribute_name' => 'uid'),
108-
array('field_name' => 'roles', 'attribute_name' => 'roles'),
108+
array('field_name' => 'roles', 'attribute_name' => 'roles', 'field_property' => 'target_id'),
109109
array('field_name' => 'name', 'attribute_name' => 'cn'),
110110
array('field_name' => 'mail', 'attribute_name' => 'mail'),
111111
array('field_name' => 'field_first_name', 'attribute_name' => 'givenName'),

lib/Auth/Source/External.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* // Which attributes should be retrieved from the Drupal site.
5959
* 'attributes' => array(
6060
* array('field_name' => 'uid', 'attribute_name' => 'uid'),
61-
* array('field_name' => 'roles', 'attribute_name' => 'roles'),
61+
* array('field_name' => 'roles', 'attribute_name' => 'roles', 'field_property' => 'target_id'),
6262
* array('field_name' => 'name', 'attribute_name' => 'cn'),
6363
* array('field_name' => 'mail', 'attribute_name' => 'mail'),
6464
* array('field_name' => 'field_first_name', 'attribute_name' => 'givenName'),

lib/Auth/Source/UserPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* // Which attributes should be retrieved from the Drupal site.
3838
* 'attributes' => array(
3939
* array('field_name' => 'uid', 'attribute_name' => 'uid'),
40-
* array('field_name' => 'roles', 'attribute_name' => 'roles'),
40+
* array('field_name' => 'roles', 'attribute_name' => 'roles', 'field_property' => 'target_id'),
4141
* array('field_name' => 'name', 'attribute_name' => 'cn'),
4242
* array('field_name' => 'mail', 'attribute_name' => 'mail'),
4343
* array('field_name' => 'field_first_name', 'attribute_name' => 'givenName'),

0 commit comments

Comments
 (0)