@@ -5,7 +5,7 @@ the only difference is this is authentication module and not a script.
55
66## Setting up the CAS authentication module
77
8- Adding a authentication source
8+ Adding an authentication source
99
1010Example authsource.php:
1111
@@ -31,7 +31,7 @@ Example authsource.php:
3131
3232## Querying Attributes
3333
34- CAS V3 (since 2017) supports querying attributes. Those have to be published
34+ CAS v3 (since 2017) supports querying attributes. Those have to be published
3535for the service you're calling. Here the service publishes ` sn ` , ` firstName `
3636and ` mail ` .
3737
@@ -51,6 +51,36 @@ Or you might have to call serviceValidate for Protocol 3 via **/p3/**:
5151]
5252```
5353
54+
55+ ### Optional: Enabling Slate extensions
56+
57+ Some deployments include vendor‑specific fields (for example ` slate:* ` ) in CAS responses.
58+ You can opt in to Slate support:
59+
60+ ``` php
61+ 'cas' => [
62+ // ...
63+ 'serviceValidate' => 'https://cas.example.com/p3/serviceValidate',
64+ // Enable Slate support (optional)
65+ 'slate.enabled' => true,
66+
67+ // Optional XPath-based attribute mappings
68+ 'attributes' => [
69+ // Standard CAS attributes
70+ 'uid' => 'cas:user',
71+ 'mail' => 'cas:attributes/cas:mail',
72+
73+ // Slate namespaced attributes inside cas:attributes
74+ 'slate_person' => 'cas:attributes/slate:person',
75+ 'slate_round' => 'cas:attributes/slate:round',
76+ 'slate_ref' => 'cas:attributes/slate:ref',
77+
78+ // Some deployments also place vendor elements at the top level
79+ 'slate_person_top' => '/cas:serviceResponse/cas:authenticationSuccess/slate:person',
80+ ],
81+ ],
82+ ```
83+
5484which would return something like
5585
5686``` xml
@@ -76,22 +106,22 @@ for each value:
76106``` php
77107'cas' => [
78108 'attributes' => [
79- 'uid' => '/cas:serviceResponse/cas:authenticationSuccess/ cas:user',
80- 'sn' => '/cas:serviceResponse/cas:authenticationSuccess/ cas:attributes/cas:sn',
81- 'givenName' => '/cas:serviceResponse/cas:authenticationSuccess/ cas:attributes/cas:firstname',
82- 'mail' => '/cas:serviceResponse/cas:authenticationSuccess/ cas:attributes/cas:mail',
109+ 'uid' => 'cas:user',
110+ 'sn' => 'cas:attributes/cas:sn',
111+ 'givenName' => 'cas:attributes/cas:firstname',
112+ 'mail' => 'cas:attributes/cas:mail',
83113 ],
84114],
85115```
86116
87117and even some custom attributes if they're set:
88118
89119``` php
90- 'customabc' => '/cas:serviceResponse/cas:authenticationSuccess/ custom:abc',
120+ 'customabc' => 'custom:abc',
91121```
92122
93123You'll probably want to avoid querying LDAP for attributes:
94- set ` ldap ` to a ` null ` :
124+ set ` ldap ` to ` null ` :
95125
96126``` php
97127'example-cas' => [
0 commit comments