File: authproc_generategroups.md

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (51 lines) | stat: -rw-r--r-- 1,338 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
`core:GenerateGroups`
=====================

This filter creates a `group` attribute based on the contents of the other attributes of the user.

By default this filter will generate groups from the following set of attributes:

* `eduPersonAffiliation`
* `eduPersonOrgUnitDN`
* `eduPersonEntitlement`

This can be overridden by specifying the names of the attributes in the configuration.

It will attempt to determine a realm the user belongs to based on the `eduPersonPrincipalName`
attribute, if it is present.

The groups this filter generates are on the form `<attribute name>-<attributevalue>` and `<attributename>-<realm>-<attributevalue>`.
For example, if the user has the following attributes:

* `eduPersonPrincipalName`: `user@example.org`
* `eduPersonAffiliation`: `student`, `member`

The following groups will be created:

* `eduPersonAffiliation-student`
* `eduPersonAffiliation-member`
* `eduPersonAffiliation-example.org-student`
* `eduPersonAffiliation-example.org-member`


Examples
--------

Default attributes:

    'authproc' => array(
        50 => array(
            'class' => 'core:GenerateGroups',
        ),
    ),

Custom attributes:

    'authproc' => array(
        50 => array(
            'class' => 'core:GenerateGroups',
            'someAttribute',
            'someOtherAttribute',
        ),
    ),