I am trying to use a library for implementing a OAuth2 server in play! 2.0.4 framework using this repo https://github.com/nulab/scala-oauth2-provider
I want to know if there is any way that I can use this library with play-2.0.4 by changing play version or sbt version. I do not want to break compile time or run time dependencies.
From what I have figured out. I think its not possible because the DataHandler trait in the library expects scala.concurrent.Future return type for some methods which were introduced with a later version of scala than the one play! 2.0.4 runs on.
1
votes
1 Answers
0
votes
Nope, this is not possible. Play 2.0.4 isn't built for Scala 2.10 or later, and scala-oauth2-provider requires Scala 2.10 or later. Even if you could get Play 2.0.x compiled on Scala 2.10.x, you'd probably still run into some API compatibility problems, as that library is geared towards Play 2.2.x and 2.3.x. Between Play 2.0.x and 2.2.x, there have been many breaking API changes you'd have to reconcile.
There hasn't been support for Play 2.0.x for almost two years now. It may be the time to upgrade. Migration breaks things, yes, but in the long run you're better off staying up-to-date.