File: authproc_attributeadd.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 (49 lines) | stat: -rw-r--r-- 1,130 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
`core:AttributeAdd`
===================

Filter that adds attributes to the user.

If the attribute already exists, the values added will be merged into a multi-valued attribute.
If you instead want to replace the existing attribute, you may add the `'%replace'` option.


Examples
--------

Add a single-valued attributes:

    'authproc' => array(
        50 => array(
            'class' => 'core:AttributeAdd',
            'source' => array('myidp'),
        ),
    ),

Add a multi-valued attribute:

    'authproc' => array(
        50 => array(
            'class' => 'core:AttributeAdd',
            'groups' => array('users', 'members'),
        ),
    ),

Add multiple attributes:

    'authproc' => array(
        50 => array(
            'class' => 'core:AttributeAdd',
	    'eduPersonPrimaryAffiliation' => 'student',
            'eduPersonAffiliation' => array('student', 'employee', 'members'),
        ),
    ),

Replace an existing attributes:

    'authproc' => array(
        50 => array(
            'class' => 'core:AttributeAdd',
            '%replace',
            'uid' => array('guest'),
        ),
    ),