Hi there, sorry I’m not sure how to get this to work still. My previous code was:
@Singleton
class PasswordDAO @Inject()(dbConfigProvider: DatabaseConfigProvider, loginDAO: LoginDAO) extends DelegableAuthInfoDAO[PasswordInfo] {...}
and
bind[DelegableAuthInfoDAO[PasswordInfo]].to[PasswordDAO]
in my SilhouetteModule.
I changed this to:
@Singleton
class PasswordDAO @Inject()(dbConfigProvider: DatabaseConfigProvider, loginDAO: LoginDAO)(implicit val classTag: ClassTag[PasswordInfo]) extends DelegableAuthInfoDAO[PasswordInfo] {
removed the binding and put the following after override def config() { … }
@Provides @Named("password-repository")
def providePasswordDAO(
dbConfigProvider: DatabaseConfigProvider,
loginDAO: LoginDAO): DelegableAuthInfoDAO[PasswordInfo] = {
new PasswordDAO(dbConfigProvider, loginDAO)
}
But can’t get it to work:
CreationException: Unable to create injector, see the following errors:
1) No implementation for scala.reflect.ClassTag<com.mohiva.play.silhouette.api.util.PasswordInfo> was bound.
while locating scala.reflect.ClassTag<com.mohiva.play.silhouette.api.util.PasswordInfo>
for the 3rd parameter of auth.models.PasswordDAO.<init>(Password.scala:31)
while locating auth.models.PasswordDAO
for the 1st parameter of auth.services.PasswordService.<init>(PasswordService.scala:13)
while locating auth.services.PasswordService
for the 2nd parameter of controllers.AuthenticationController.<init>(AuthenticationController.scala:27)
while locating controllers.AuthenticationController
for the 3rd parameter of router.Routes.<init>(Routes.scala:97)
at play.api.inject.RoutesProvider$.bindingsFromConfiguration(BuiltinModule.scala:130):
Binding(class router.Routes to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
Some help would be much appreciated and thanks for creating such an awesome library! 