File: authproc_targetedid.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 (68 lines) | stat: -rw-r--r-- 2,086 bytes parent folder | download | duplicates (3)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
`core:TargetedID`
=================

This filter generates the `eduPersonTargetedID` attribute for the user.

By default, this filter will use the contents of the attribute set by the `userid.attribute` metadata option as the unique user ID.
You can also use a different attribute by setting the `attributename` option,

Parameters
----------

`attributename`
:   The name of the attribute we should use for the unique user identifier.
    Optional, will use the attribute set by the `userid.attribute` metadata option by default.
    *deprecated:* Please use `identifyingAttribute` instead.

`identifyingAttribute`
:   The name of the attribute we should use for the unique user identifier.
    Optional, will use the attribute set by the `userid.attribute` metadata option by default.

`nameId`
:   Set this option to `TRUE` to generate the attribute as in SAML 2 NameID format.
    This can be used to generate an Internet2 compatible `eduPersonTargetedID` attribute.
    Optional, defaults to `FALSE`.


Examples
--------

Using the attribute from `userid.attribute`:

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

A custom attribute:

    'authproc' => array(
        50 => array(
            'class' => 'core:TargetedID',
            'identifyingAttribute' => 'eduPersonPrincipalName'
        ),
    ),

Internet2 compatible `eduPersontargetedID`:

    /* In saml20-idp-hosted.php. */
    $metadata['__DYNAMIC:1__'] = array(
        'host' => '__DEFAULT__',
        'auth' => 'example-static',

        'authproc' => array(
            60 => array(
                'class' => 'core:TargetedID',
                'nameId' => TRUE,
            ),
            90 => array(
                'class' => 'core:AttributeMap',
                'name2oid',
            ),
        ),
        'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
        'attributeencodings' => array(
            'urn:oid:1.3.6.1.4.1.5923.1.1.1.10' => 'raw', /* eduPersonTargetedID with oid NameFormat. */
        ),
    );