Closed bravegag closed 7 years ago
Cool, could you also adapt the usage sample, please, if needed?
Sure! Indeed I missed that detail.
ok done!
Adapted test-app too but can't see why it is failing in Travis ...
it was actually the heroku update that failed...
The
com.feth.play.module.pa.providers.password.UsernamePasswordAuthProvider
abstract base implementation is used in the usage sample and requires clients to implementplay.data.Form<S> getSignupForm()
andplay.data.Form<L> getLoginForm()
. The problem is that Scala implementations will not be able to reuse the implementation because it requires Java Forms and the Form types are incompatible between Java (play.data.Form
) and Scala (play.api.data.Form
).By applying this change, the partial implementation
UsernamePasswordAuthProvider
allows subclassing from Scala applications too at the very little cost of not having the FormbindFromRequest
boilerplate code. It also allows mixed Java-Scala applications to define Forms in either way.The client needs to provide implementation for the
getSignup
andgetLogin
directly and as implementation can use whatever Form type it prefers.