Back Forum Reply New

How to replace JASIG library for CAS authentication?

Hi,

I'm facing an strange issue with the JASIG CAS ticket validation after a successful user authentication.

At first sight, this is linked to JASIG since one of our application is using the old Acegi 1.0.3 security API for CAS authentication and it is working perfectly.

For our new application, we are using Spring Security (2.0.3) along with JASIG (cas-client-core - jasig - 3.1.1) as the CAS library.

In order to verify if our problem is indeed linked to JASIG in our environment, I'm trying to switch to the YALE's CAS authentication but it fails. I have tried different configurations but none succeeds.

For instance, If I try to use the YALE library, I have this error:Code:
Caused by: org..beans.TypeMismatchException: Failed to convert property value of type [edu.yale.its.tp.cas.client.ServiceTicketValidator] to required type [org.jasig.cas.client.validati
on.TicketValidator] for property 'ticketValidator'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [edu.yale.its.tp.cas.client.ServiceTicketValidator] to requiredtype [org.jasig.cas.client.validation.TicketValidator] for property 'ticketValidator': no matching editors or conversion strategy found
With this configuration:Code:
lt;bean id=quot;casAuthenticationProviderquot; class=quot;org..security.providers.cas.CasAuthenticationProviderquot;gt;     lt;security:custom-authentication-provider /gt;     lt;property name=quot;userDetailsServicequot; ref=quot;userDetailsServicequot;/gt;     lt;property name=quot;servicePropertiesquot; ref=quot;servicePropertiesquot; /gt;     lt;property name=quot;ticketValidatorquot;gt;        lt;bean class=quot;edu.yale.its.tp.cas.client.ServiceTicketValidatorquot;gt;lt;property name=quot;casValidateuclquot;gt;   lt;valuegt;caslt;/valuegt;lt;/propertygt;           lt;/beangt;     ...
lt;/beangt;
Is there a way to replace JASIG by another library? If yes, could someone give me some hints about how to do it? Thanks a lot,

Regards.

Apparently, the only of a changing the CAS library is to replace the CASAuthenticationProvider (from Spring) itself. Indeed, the methodCode:
public void setTicketValidator(TicketValidator ticketValidator) {  this.ticketValidator = ticketValidator;
}
only accepts subclasses of Code:
org.jasig.cas.client.validation.TicketValidator
I probably misunderstand something but I'm really surprise to see a generic class be dependent on an external library. Am I missing something here?

Thanks.
¥
Back Forum Reply New