In 5.1 you do it by means of the following property: cas.authn.jdbc.query[0].passwordEncoder.type=com.example.CustomPasswordEncoder
https://apereo.github.io/cas/5.0.x/installation/Configuration-Properties.html#database-authentication Cheers, D. From: Mathieu Plasse <[email protected]> Reply: [email protected] <[email protected]> Date: May 17, 2017 at 9:04:39 AM To: CAS Community <[email protected]> Subject: [cas-user] custome passwordEncoder in CAS 5.1 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&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/foce10?useUnicode=true&characterEncoding=utf-8" /> <property name="username" value="force10" /> <property name="password" value="force10" /> </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/741f9d7d-b5ad-441a-af75-93a75d98f20d%40apereo.org. -- - 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/etPan.591c4b09.193cadda.3c4%40unicon.net.
