Hello, today I first read the documentation for the tapestry ioc - it took me several hours. I am still not at a point where "I got it" as Howard really well described at http://tapestry.apache.org/tapestry5/tapestry-ioc/overview.html. This introductory doc is really good!
I downloaded the tapestry-spring-security and installed the project into Eclipse to browse through the code. Now I am fairly tired, but need to ask one question... How do I disable RememberMe service with tapestry-spring-security? I am reading how one can contribute and override configurations, but how do one "disable" configuration entry? The Reference documentation for Spring security on page 53 says: If you are familiar with the topics discussed in the chapter on namespace configuration, you can enable remember-me authentication just by adding the <remember-me> element: <http> ... <remember-me key="myAppKey"/> </http> It is automatically enabled for you if you are using the auto-config setting. The UserDetailsService will normally be selected automatically. If you have more than one in your application context, you need to specify which one should be used with the user-service-ref attribute, where the value is the name of your UserDetailsService bean. The last paragraph also suggests/explains the error I am getting (see bellow - ...matched by 2 services ...) How do I do this with tapestry-spring-security? Thanks for any input!!! Borut 2008/11/25 Borut Bolčina <[EMAIL PROTECTED]>: > Hi, > > only now have I returned to this task. I get http error 500: > > Exception constructing service 'RememberMeServices': Error invoking > service builder method > nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService, > String) (at SecurityModule.java:303) (for service > 'RememberMeServices'): Service interface > org.springframework.security.userdetails.UserDetailsService is matched > by 2 services: UserDetailsWithOpenIDService, > UserDetailsWithUsernameAndPasswordService. Automatic dependency > resolution requires that exactly one service implement the interface. > > AppModule.java > =========== > <snip> > /* USERNAME, PASSWORD */ > public static UserDetailsService > buildUserDetailsWithUsernameAndPasswordService(@Inject PasswordEncoder > encoder, @Inject SaltSource salt) { > return new UserDetailsWithUsernameAndPasswordService(encoder, salt); > } > > /* OPENID */ > public static UserDetailsService buildUserDetailsWithOpenIDService() { > return new UserDetailsWithOpenIDServiceImpl(); > } > > public static OpenIDAuthenticationProvider > buildOpenIDAuthenticationProvider( > @InjectService("UserDetailsWithOpenIDService") > UserDetailsService userDetailsService) throws Exception { > OpenIDAuthenticationProvider provider = new > OpenIDAuthenticationProvider(); > > provider.setUserDetailsService(userDetailsService); > provider.afterPropertiesSet(); > > return provider; > } > > public static void contributeProviderManager( > OrderedConfiguration<AuthenticationProvider> configuration, > @InjectService("OpenIDAuthenticationProvider") > AuthenticationProvider openIdAuthenticationProvider, > @InjectService("DaoAuthenticationProvider") > AuthenticationProvider daoAuthenticationProvider) { > > configuration.add("openIDAuthenticationProvider", > openIdAuthenticationProvider); > configuration.add("daoAuthenticationProvider", > daoAuthenticationProvider ); > } > </snip> > > What is missing? > > Cheers, > Borut > > 2008/11/6 Ulrich Stärk <[EMAIL PROTECTED]>: >> Just inject both providers into your contributeProviderManager method: >> >> public static void contributeProviderManager( >> OrderedConfiguration<AuthenticationProvider> configuration, >> @InjectService("OpenIDAuthenticationProvider") >> AuthenticationProvider openIdAuthenticationProvider, >> @InjectService("DaoAuthenticationProvider") >> AuthenticationProvider daoAuthenticationProvider) { >> >> configuration.add("openIDAuthenticationProvider", >> openIdAuthenticationProvider); >> configuration.add("daoAuthenticationProvider", daoAuthenticationProvider >> ); >> } >> >> Cheers, >> >> Uli >> >> Borut Bolčina schrieb: >>> >>> Hello, >>> >>> I need some help/guidelines in implementing a login with classic username >>> and password login and with openid. >>> >>> I am looking at >>> http://www.localhost.nu/svn/public/tapestry-spring-security-sample/ for >>> classic setup and >>> http://wiki.apache.org/tapestry/Tapestry5HowToSpringSecurityAndOpenIdfor >>> OpenID. >>> >>> My goal is to join them in one web app. Both of them work just fine >>> separately. >>> >>> Now this method in AppModule is where I am stuck: >>> >>> public static void contributeProviderManager( >>> OrderedConfiguration<AuthenticationProvider> configuration, >>> @InjectService("OpenIDAuthenticationProvider") >>> AuthenticationProvider openIdAuthenticationProvider) { >>> >>> configuration.add("openIDAuthenticationProvider", >>> openIdAuthenticationProvider); >>> } >>> >>> The above method is part of >>> >>> http://www.localhost.nu/java/tapestry-spring-security/apidocs/nu/localhost/tapestry5/springsecurity/services/SecurityModule.html >>> . >>> >>> It allows only one authentication provider, but I need another one: >>> >>> public static void contributeProviderManager( >>> OrderedConfiguration<AuthenticationProvider> configuration, >>> @InjectService( "DaoAuthenticationProvider" ) >>> AuthenticationProvider daoAuthenticationProvider ) { >>> >>> configuration.add( >>> "daoAuthenticationProvider", >>> daoAuthenticationProvider ); >>> } >>> >>> How, if at all possible, do I configure my app with two authentication >>> providers? >>> >>> Cheers, >>> Borut >>> >>> P.S. I am new to T5 and T5's IoC. >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >