Hi,
i need populate some attributes from database after authenticate
credential from
org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver.
The key to get these attributes is the username, so what is the right
way to do this work? I have to subclass
UsernamePasswordCredentialsToPrincipalResolver so i can populate
attributeRepository, or i have to set
an implementation of AttributeRepository as field of
UsernamePasswordCredentialsToPrincipalResolver? Example:
<bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"
>
<property name="attributeRepository">
<ref bean="attributeRepository" />
</property>
</bean>
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg ref="dataSource"/>
<constructor-arg>
<list>
<value>??</value>
</list>
</constructor-arg>
<constructor-arg value="SELECT profile_id FROM ID_USER U u.name_=
?" />
<property name="columnsToAttributes">
<map>
<entry key="profileId" value="profile_id" />
</map>
</property>
</bean>
In second constructor how is possible put the username entered in cas
login??
Maurix.
--
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