I'm trying to configure a custom passwordEncoder on CAS 5.0 . My problem is 
the PolicyBasedAuthenticationManager as completly changed from 4 to 5 so 
old deployerConfig.xml do not work.
Old 4.0 was like that :
<bean id="authenticationManager" 
class="org.jasig.cas.authentication.PolicyBasedAuthenticationManager">
<constructor-arg>
<map>
<entry key-ref="primaryAuthenticationHandler" value-ref="dbAuthHandler"/>
</map>
</constructor-arg>
<property name="authenticationPolicy">
            <bean 
class="org.jasig.cas.authentication.AnyAuthenticationPolicy" />
</property>
</bean>
<bean id="proxyAuthenticationHandler" 
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" />
<bean id="dbAuthHandler" 
class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
<property name="dataSource">
   <bean id="dataSource" 
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" 
value="jdbc:mysql://localhost:3306/cas?useUnicode=true&amp;characterEncoding=utf-8"
 
/>
<property name="username" value="root" />
<property name="password" value="" />
</bean>
</property>
<property name="sql" value="my request" />
<property name=="passwordEncoder">
<bean id="passwordEncoder" class="my.custom.PasswordEncoderClass"/>
</property>
</bean>


I tried to create a 5.0 file like that :
 <bean id="authenticationManager" 
class="org.apereo.cas.authentication.PolicyBasedAuthenticationManager">
  <constructor-arg>
   <map>
    <entry key-ref="authenticationEventExecutionPlan" value-ref="execPlan"/>
    <entry key-ref="servicesManager" value-ref="serviceMan"/>
   </map>
  </constructor-arg>
 </bean>
 <bean id="execPlan" 
class="org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan">
  <property name="authenticationHandler">
   <bean id="dbAuthHandler" 
class="org.apereo.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
    <property name="dataSource">
     <bean id="dataSource" 
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
      <property name="driverClassName" value="com.mysql.jdbc.Driver" />
      <property name="url" 
value="jdbc:mysql://localhost:3306/cas?useUnicode=true&amp;characterEncoding=utf-8"
 
/>
      <property name="username" value="root" />
      <property name="password" value="" />
     </bean>
    </property>
    <property name="sql" value="my resuest" />
    <property name="passwordEncoder">
     <bean id="passwordEncoder" class="my.custom.PasswordEncoderClass"/>
    </property>
   </bean>
  </property>
 </bean>
 <bean id="serviceMan" class= 
"org.apereo.cas.services.DefaultServicesManagerImpl"/>
</beans>


BUT I can't make it work it just not start without any Log.

Does anyone tried this ?

Mathieu

-- 
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cb853f64-1529-4e72-939f-0508cf29c48a%40apereo.org.

Reply via email to