Customizing CasClient used by acegi security
Stefan Dürr
duerr at hrz.tu-darmstadt.de
Wed Nov 12 09:41:48 EST 2008
Hi Robert, it was me who asked for a functionality for storing speacial
attributes from the service-response into a user-object ;)
Like Scott wrote, you have to use an userDetailsService, like the class
"InMemoryDaoImpl". But this one can not store special attributes. My
solution was to write my own "MyInMemoryDaoImpl", based on the source of
the original "InMemoryDaoImpl" but with attributes to store my special
attributes. My CAS-Client is also modified and can acces
MyInMemoryDaoImpl to store the attributes, which he parsed out of the
cas-service-response
regards, stefan
Robert Lewis schrieb:
> Hi,
>
> An update, now I see that bean casAuthoritiesPopulator is not needed,
> but I can't figure out what the bean casAuthenticationProvider needs
> to get initialized. What I have configured is below. I get a deployment
> error message of the following. "Invocation of init method failed;
> nested exception is java.lang.IllegalArgumentException: A
> userDetailsService must be set"
>
> Any help would be appreciated.
>
>
>
> <bean id="casAuthenticationManager"
> class="org.springframework.security.providers.ProviderManager">
> <property name="providers">
> <list>
> <ref bean="casAuthenticationProvider"/>
> </list>
> </property>
> </bean>
>
> <bean id="casAuthenticationProvider"
> class="org.springframework.security.providers.cas.CasAuthenticationProvider">
> <property name="userDetailsService">
> <list>
> <bean class="org.springframework.security.userdetails.User" />
> </list>
> </property>
> </bean>
>
>
>
> Robert Lewis wrote:
>
>> So, I have been trying to follow up on this advice and I have run into
>> an obstacle I need help with. When I upgrade to Spring Security 2 I see
>> the bean casAuthoritiesPopulator in securityContext.xml is still needed,
>> but the class DaoCasAuthoritiesPopulator does not seem to be available
>> in Spring Security 2. So, what do I replace it with? Do I have to write
>> a class that returns a UserDetailsService ?
>>
>>
>> Thanks,
>>
>> Robert Lewis
>>
>>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
More information about the cas
mailing list