Hi there,
I am trying to setup CAS to return attributes related to an authenticated user.
These attributes reside in an oracle database. I have managed to get some
attributes returning correctly however some of the queries return multiple rows
and unfortunatly only the first row is being returned. I have included the
relevent fragment from the deployerConfigContext.xml file below. The two
attributes that should be returning multiple rows are HasAccesToProducts and
MemberOf in the productAttributeRepository and the GroupAttributeRepository. If
someone can give me a pointer on how to implement multiple attributes with the
same name that would be fantastic as 2hrs of searching have yielded no examples.
Thanks,
Stuart
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.MergingPersonAttributeDaoImpl">
<property name="personAttributeDaos">
<list>
<ref bean="userAttributeRepository" />
<ref bean="productAttributeRepository" />
<ref bean="groupAttributeRepository" />
</list>
</property>
</bean>
<bean id="userAttributeRepository"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSource"/>
<constructor-arg index="1" value="SELECT
client_name,email_address,client_code FROM client WHERE {0}"/>
<property name="queryAttributeMapping">
<map>
<entry key="username" value="client_code" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="client_name" value="Name" />
<entry key="email_address" value="Email" />
</map>
</property>
</bean>
<bean id="productAttributeRepository"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSource"/>
<constructor-arg index="1" value="SELECT product_code,client_code FROM
client_products WHERE {0}"/>
<property name="queryAttributeMapping">
<map>
<entry key="username" value="client_code" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="product_code" value="HasAccessToProduct" />
</map>
</property>
</bean>
<bean id="groupAttributeRepository"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSource"/>
<constructor-arg index="1" value="SELECT package_code,client_code FROM
client_packages WHERE {0}"/>
<property name="queryAttributeMapping">
<map>
<entry key="username" value="client_code" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="package_code" value="MemberOf" />
</map>
</property>
</bean>
________________________________
CONFIDENTIALITY NOTICE AND DISCLAIMER
The information in this transmission may be confidential and/or protected by
legal professional privilege, and is intended only for the person or persons to
whom it is addressed. If you are not such a person, you are warned that any
disclosure, copying or dissemination of the information is unauthorised. If you
have received the transmission in error, please immediately contact this office
by telephone, fax or email, to inform us of the error and to enable
arrangements to be made for the destruction of the transmission, or its return
at our cost. No liability is accepted for any unauthorised use of the
information contained in this transmission.
--
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