Total Complexity | 1 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class SAMLMemberExtension extends DataExtension |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private static $db = [ |
||
|
|||
22 | // Pointer to the session object held by the IdP |
||
23 | 'SAMLSessionIndex' => 'Varchar(255)', |
||
24 | // Unique user identifier, same field is used by LDAPMemberExtension |
||
25 | 'GUID' => 'Varchar(50)', |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * These are used by {@link SAMLController} to map specific IdP claim rules |
||
30 | * to {@link Member} fields. Availability of these claim rules are defined |
||
31 | * on the IdP. |
||
32 | * |
||
33 | * @var array |
||
34 | * @config |
||
35 | */ |
||
36 | private static $claims_field_mappings = [ |
||
37 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname' => 'FirstName', |
||
38 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname' => 'Surname', |
||
39 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress' => 'Email' |
||
40 | ]; |
||
41 | |||
42 | /** |
||
43 | * @param FieldList $fields |
||
44 | */ |
||
45 | public function updateCMSFields(FieldList $fields) |
||
51 |