2011-11-03 56 views
0

我想使用Spring3與安全和CAS。我收到以下錯誤。Spring3與安全和CAS

原因:沒有的AuthenticationProvider發現org.springframework.security.authentication.UsernamePasswordAuthenticationToken

有人能告訴我爲什麼?下面是我的XML文件

<authentication-manager alias="authenticationManager"> 
     <authentication-provider ref="casAuthenticationProvider" /> 
    </authentication-manager> 

    <beans:bean id="serviceProperties" 
     class="org.springframework.security.cas.ServiceProperties"> 
     <beans:property name="service" 
      value="http://localhost:8081/Spring3MVCandHibernate3/j_spring_cas_security_check" /> 
     <beans:property name="sendRenew" value="false" /> 
    </beans:bean> 

    <beans:bean id="casAuthenticationProvider" 
     class="org.springframework.security.cas.authentication.CasAuthenticationProvider"> 
     <beans:property name="userDetailsService" ref="userService" /> 
     <beans:property name="serviceProperties" ref="serviceProperties" /> 
     <beans:property name="ticketValidator"> 
      <beans:bean 
       class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator"> 
       <beans:constructor-arg index="0" 
        value="http://localhost:8080/cas-server-webapp-3.4.10/login" /> 
      </beans:bean> 
     </beans:property> 
     <beans:property name="key" 
      value="an_id_for_this_auth_provider_only" /> 
    </beans:bean> 


    <user-service id="userService"> 
     <user name="joe" password="joe" authorities="ROLE_USER" /> 
    </user-service> 

回答

0

我認爲你有org.jasig.cas.client.validation.Cas20ServiceTicketValidator豆指定的網址中不應/登錄年底。

它的一個老問題;請讓我知道如果這是你如何解決你的錯誤。

相關問題