Ah right - sorry for not paying attention. This should work then:

        override val maxAge = Play.maybeApplication.flatMap(_.configuration.getMilliseconds("session.maxAge"))
          .map(Duration(_, "ms").toSeconds)