[cas-dev] Update to yale Java client to accept attributes
Sean R. McNamara
sean.r.mcnamara at Dartmouth.EDU
Thu Jul 10 12:01:47 EDT 2008
Hi all,
I modified the Yale 2.1.1 CAS client to accept attributes handed back by
the CAS server.
It will accept anything in the serviceResponse formatted such as:
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<cas:user>Sean R. McNamara</cas:user>
<cas:attribute name="loginType" value="USERPASS"/>
<cas:attribute name="name" value="Sean R. McNamara"/>
<cas:attribute name="affil" value="DART"/>
</cas:authenticationSuccess>
</cas:serviceResponse>
and make the values available in the session named as:
edu.yale.its.tp.cas.client.filter.attribute.<attribute name>
e.g. edu.yale.its.tp.cas.client.filter.attribute.name or
edu.yale.its.tp.cas.client.filter.attribute.affil or
edu.yale.its.tp.cas.client.filter.loginType (from the above example)
it also makes a HashMap available of all the values at
edu.yale.its.tp.cas.client.filter.attribute
Another feature I added was to allow the filter to override the value of
edu.yale.its.tp.cas.client.filter.user in web.xml
by setting an init-param such as:
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.idattribute</param-name>
<param-value>edu.yale.its.tp.cas.client.filter.attribute.name</param-value>
</init-param>
I would like to contribute this code back to the project. How should I
go about this?
Thanks!
..Sean.
More information about the cas-dev
mailing list