joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 366 forks source link

separate view from auth logic in UsernamePasswordAuthProvider #211

Open amichair opened 10 years ago

amichair commented 10 years ago

It would be great if UsernamePasswordAuthProvider could be restructured to separate the view from the business logic. For example, it currently has private methods dealing with Forms and it redirects the client browser to appropriate urls, which tightly couples the implementations, and makes it impossible to use an alternative front-end (client-side templates, REST API, etc.). Ideally, the parent provider would contain only the authentication logic, and subclasses would implement the specifics of user interactions and/or returning results to the client.

joscha commented 10 years ago

@amichair would love to see that - a PR would be very welcome!