Ted,
See: https://github.com/Jasig/person-directory/blob/master/person-directory-imp l/src/main/java/org/jasig/services/persondir/support/NamedStubPersonAttrib uteDao.java This should be available in the latest version of person directory, or in cas-addons. From: Ted Fisher [mailto:[email protected]] Sent: Friday, August 21, 2015 12:04 PM To: [email protected] Subject: [cas-user] creating an attribute with fixed value I thought that this would be simple, but am having a problem making it happen: CAS 3.5.0 I am currently pulling attributes from LDAP (was pulling from two different LDAP servers, but now using just one). I want to add an attribute that could be released to services which does not come from LDAP, but is simply a fixed value, like user_role="regular". So, I tried this in attributes-configuration.xml: <bean id="attributeRepository" class="org.jasig.services.persondir.support.MergingPersonAttributeDaoImpl" > <property name="personAttributeDaos"> <list> <ref bean="bindLdapAttributeRepository" /> <!-- Next line removed by tffishe June 3,2014 no longer used --> <ref bean="StubbAttributeRepository" /> </list> </property> </bean> <bean id="bindLdapAttributeRepository" class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao"> My LDAP attributes . </bean> <bean id="StubbAttributeRepository" class="org.jasig.services.persondir.support.StubPersonAttributeDao"> <property name="backingMap"> <map> <entry key="user_role" value="test" /> </map> </property> </bean> But, debug logging does not show the attribute user_role getting set: DEBUG 2015-08-21 13:43:04,820 [http-8080-2][] org.jasig.cas.authentication.AuthenticationManagerImpl - Attribute map for shibboleth_test_account: {uid=shibboleth_test_account, FirstName=Shibboleth, LastName=Test Account} Shouldn't I be able to use StubPersonAttributeDao to set a fixed value attribute or am I doing something wrong? Ted F. Fisher Information Technology Services -- You are currently subscribed to [email protected] <mailto:[email protected]> as: [email protected] <mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
