JWTAuthenticatorSettings: Cannot generate a config value reader when migrating to 5.0.0-RC2



I tried to migrate the following method from silhouette 4 to 5:

def provideAuthenticatorService(
  @Named("authenticator-crypter") crypter: Crypter,
  idGenerator: IDGenerator,
  configuration: Configuration,
  clock: Clock): AuthenticatorService[JWTAuthenticator] = {

  val config = configuration.underlying.as[JWTAuthenticatorSettings]("silhouette.authenticator")
  val encoder = new CrypterAuthenticatorEncoder(crypter)

  new JWTAuthenticatorService(config, None, encoder, idGenerator, clock)

But I get the following error:

Cannot generate a config value reader for type Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]], because value readers cannot be auto-generated for types with type parameters. Consider defining your own ValueReader[Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]]]

Any idea?


Have you imported the EnumerationReader?


I actually removed it because scala 2.12 complains that it was unused :-/. Good catch, thanks!