-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to Play 2.6 #614
Migrate to Play 2.6 #614
Conversation
@gmethvin thanks for much for this. I'm sorry I have not been able to keep up. I'll review the changes and see how we can fix the remaining issues to have a version compatible with 2.6. |
@@ -58,13 +59,12 @@ object IdentityProvider { | |||
// todo: do I want this here? | |||
val sslEnabled: Boolean = { | |||
import Play.current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of what's left to do is to remove these usages of Play.current
from the static object
s.
This is also problematic because, being a val
, it is not going to reload when you stop an app and start a new one with different configuration, which is something you'd often do in tests. If we changed it to a def
we have to incur the initialization cost on each call, or have a cache keyed on the Application.
My suggestion would be to have traits/classes like IdentityProviderConfig
that we pass around, similar to what we have in Play: https://github.com/playframework/playframework/blob/2.6.11/framework/src/play-filters-helpers/src/main/scala/play/filters/headers/SecurityHeadersFilter.scala#L75
I don't think it should affect end users that much because these constants are primarily used internally to configure SecureSocial.
dca3bf5
to
7ecd5a9
Compare
Updated to inject the configs |
@@ -0,0 +1,81 @@ | |||
securesocial { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reference.conf
documents and provides defaults for all our configuration
module-code/build.sbt
Outdated
ws, | ||
filters, | ||
specs2 % "test", | ||
"com.typesafe.play" %% "play-mailer" % "5.0.0", | ||
"com.typesafe.play" %% "play-mailer" % "6.0.1", | ||
"io.methvin.play" %% "autoconfig-macros" % "0.2.0" % "provided", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this macro library to generate configs from case classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thank you @gmethvin
@gmethvin I haven't looked at it yet, but I still ask: Is there an example project for SecureSocial in combination with Play 2.6? |
How connect last secure social for Play 2.6? libraryDependencies += "ws.securesocial" %% "securesocial" % "master" does worked :-/ which version need write in build.sbt? |
Any news with a deployed sbt module? |
This attempts to update SecureSocial to work on Play 2.6, Scala 2.12 and sbt 1.
Fixes #611 #612
At the moment it's still a work in progress. It compiles, but I had to remove some tests and remove some deprecated code. It still requires global state because some of the "constants" use the configuration from the currently running application.
Feedback is appreciated.