If you want to use a DAO-based (where you get auth information from a db or something) authentication manager, you can drop in the hivemind-acegi-dao.jar file into your classpath. Then, you have to provide an implementation for the hivemind.acegi.dao.UserDetailsService service point:
<implementation service-id="hivemind.acegi.dao.UserDetailsService"> <invoke-factory> <construct class="com.myco.myproj.MyUserDetailsService" /> </invoke-factory> </implementation> There are some pre-defined implementations of UserDetailsService, but to get the idea working you can provide a dummy implementation just to make sure everything is pieced together correctly. On 11/29/06, Cyrille37 <[EMAIL PROTECTED]> wrote:
James Carman a écrit : > Ahh yes. You do need to tell Acegi how you want to authenticate, so > you need to have an implementation defined for the > AuthenticationManager service point I define. Hello James, Could you please give me a little example, or write a little howto somewhere (tapestry's wiki ?). Thanks cyrille. > > > On 11/28/06, Cyrille37 <[EMAIL PROTECTED]> wrote: >> James Carman a écrit : >> > You don't need spring at all. You would use your own hivemodule.xml. >> > I believe you can just drop in the jar and the BASIC HTTP >> > authentication will work. There are customization points you can use >> > (like the name of your "realm" and stuff), but it should work "out of >> > the box." >> Hi James, >> >> I've remove all stuff about acegi form my project. >> Just added tapestry-acegi.jar in the Tomcat lib folder. >> >> When starting Tomcat, the following exception is throwed. It claims "An >> AuthenticationManager". >> >> ERROR [[Catalina].[localhost].[/Tapestry03].[tapestry03AppServlet]] >> "Servlet.service()" pour la servlet tapestry03AppServlet a généré une >> exception >> org.apache.hivemind.ApplicationRuntimeException: Unable to construct >> service tapestry.acegi.BasicProcessingFilter: Error building service >> tapestry.acegi.BasicProcessingFilter: Error at >> jar:file:/D:/tomcat-5.5.17/common/lib/tapestry-acegi-0.1-20060609.153634-9.jar!/META-INF/hivemodule.xml, >> >> line 46, column 63: Unable to initialize service >> tapestry.acegi.BasicProcessingFilter (by invoking method >> afterPropertiesSet on >> org.acegisecurity.ui.basicauth.BasicProcessingFilter): An >> AuthenticationManager is required >> [jar:file:/D:/tomcat-5.5.17/common/lib/tapestry-acegi-0.1-20060609.153634-9.jar!/META-INF/hivemodule.xml, >> >> line 44, column 25] >> at >> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:165) >> >> at >> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139) >> >> at >> org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68) >> >> at $Filter_10f30d59ebf._service($Filter_10f30d59ebf.java) >> at $Filter_10f30d59ebf.doFilter($Filter_10f30d59ebf.java) >> at $Filter_10f30d59ebe.doFilter($Filter_10f30d59ebe.java) >> at >> com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.service(ServletRequestServicerFilterAdapter.java:42) >> >> at >> $ServletRequestServicer_10f30d59ec8.service($ServletRequestServicer_10f30d59ec8.java) >> >> at >> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52) >> >> at >> $ServletRequestServicerFilter_10f30d59eb7.service($ServletRequestServicerFilter_10f30d59eb7.java) >> >> at >> $ServletRequestServicerFilter_10f30d59eb6.service($ServletRequestServicerFilter_10f30d59eb6.java) >> >> at >> $ServletRequestServicer_10f30d59ec8.service($ServletRequestServicer_10f30d59ec8.java) >> >> at >> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53) >> >> at >> $ServletRequestServicerFilter_10f30d59ec5.service($ServletRequestServicerFilter_10f30d59ec5.java) >> >> at >> $ServletRequestServicerFilter_10f30d59ec4.service($ServletRequestServicerFilter_10f30d59ec4.java) >> >> at >> $ServletRequestServicer_10f30d59ec8.service($ServletRequestServicer_10f30d59ec8.java) >> >> at >> com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainAdapter.java:43) >> >> > >> > >> > On 11/28/06, Cyrille37 <[EMAIL PROTECTED]> wrote: >> >> James Carman a écrit : >> >> > The @Secured annotation is from the Acegi library (you have to >> get the >> >> > "tiger" jar). >> >> Thanks a lot. I'm a beginner ... >> >> >> >> Are directives in the hivemodule.xml from tapestry-acegi.jar are >> >> sufficients, or we need to put some more directives in web.xml or >> spring >> >> 's applicationContext-security.xml ? >> >> >> >> Cyrille >> >> > >> >> > On 11/28/06, Cyrille37 <[EMAIL PROTECTED]> wrote: >> >> >> Hello, >> >> >> >> >> >> I'm trying to integrate Acegi by using tapestry-acegi from >> >> >> carmanconsulting.com. >> >> >> >> >> >> I've imported com.javaforge.tapestry.acegi.enhance.* but Java >> do not >> >> >> recognize the @Secured decoration. >> >> >> >> >> >> import com.javaforge.tapestry.acegi.*; >> >> >> import com.javaforge.tapestry.acegi.enhance.*; >> >> >> @Secured("ROLE_USER") >> >> >> public abstract class UserForm extends BasePage implements >> >> >> PageBeginRenderListener >> >> >> { >> >> >> ... >> >> >> >> >> >> Have you got an idea ? >> >> >> Thanks >> >> >> cyrille >> >> >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]