Hi, I am using Cas 4.1.7 and trying to override the returned username ID with an LDAP attribute (uid), following that documentation :
https://apereo.github.io/cas/4.1.x/integration/Attribute-Release.html#returnallattributereleasepolicy Here is the configuration for the service: <bean class="org.jasig.cas.services.RegexRegisteredService" p:id="1" p:name="Authentication on XXX" p:serviceId="XXX" p:evaluationOrder="1"> <property name="attributeReleasePolicy"> <bean class= "org.jasig.cas.services.ReturnAllAttributeReleasePolicy" /> </property> <property name="usernameAttributeProvider"> <bean class= "org.jasig.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider" > <property name="usernameAttribute" value="uid" /> </bean> </property> </bean> Unfortunately, when rebuilding the application, I get the following error message : "Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'usernameAttribute' of bean class [org.jasig.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider]: Bean property 'usernameAttribute' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?" If I explicitly switch back to the default username provider using the following config, it builds fine again: <property name="usernameAttributeProvider"> <bean class= "org.jasig.cas.services.DefaultRegisteredServiceUsernameProvider" /> </property> I must be missing something... Any hint ? Best regards, Ganael. -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/a6ca7cce-228d-41a2-9803-e6ea9bd322be%40apereo.org.
