The default implementation of the Attribute code only works if you also
configure an appropriate service using the Services Management tool.  CAS is
designed to only send back attributes if a service in the Service Management
tool is configured to accept those attributes.

Services in the Services Management tool can be configured using Ant Pattern
Matching so the definition of a service is pretty broad.

-Scott

On Nov 22, 2007 11:38 PM, dale77 <[EMAIL PROTECTED]> wrote:

>
> So here's what I've tried so far - which is not working as I'd like. I am
> trying to demonstrate that attributes added to the principal can flow
> through to the service validation response.
>
> In deployerConfigContext.xml, I've wired up a dummy attributeRepository to
> the standard resolver:
>
> <bean
> class="
> org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver
> ">
> <property name="attributeRepository">
> <ref bean="attribRepository" />
> </property>
> </bean>
>
> <bean id="attribRepository"
> class="org.jasig.services.persondir.support.StubPersonAttributeDao">
> <property name="backingMap">
> <map>
> <entry key="uid" value="uid" />
> <entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
> <entry key="groupMembership" value="groupMembership" />
> </map>
> </property>
> </bean>
>
> Then, I'm expecting to be able to access a "uid" item in the principal's
> attribute map in the service ticket validation response, so I modified
> casServiceValidationSuccess.jsp as below:
>
> ...
> <cas:authenticationSuccess>
> <cas:user>${fn:escapeXml(assertion.chainedAuthentications[fn:length(
> assertion.chainedAuthentications)-1].principal.id)}</cas:user>
> <cas:uid>${fn:escapeXml(assertion.chainedAuthentications[fn:length(
> assertion.chainedAuthentications)-1].principal.attributes.uid)}</cas:uid>
> ...
>
> However the uid in the response is empty.
>
> <cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas";>
> <cas:authenticationSuccess>
> <cas:user>[EMAIL PROTECTED]</cas:user>
> <cas:uid />
> </cas:authenticationSuccess>
> </cas:serviceResponse>
>
> Anyone know what I'm doing wrong? Perhaps this is just wrong-headed....
>
> Thanks
>
> Dale
> --
> View this message in context:
> http://www.nabble.com/How-to-store-data-from-the-Authentication-in-the-Principal-tf4859467.html#a13906933
> Sent from the CAS Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>



-- 
-Scott Battaglia

LinkedIn: http://www.linkedin.com/in/scottbattaglia
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to