t2v/play2-auth — pull request #53 by smessmer (2013-09-28 03:15:22+00:00)
Title: Allow non-async authorizedAction (and break fewer code)

The current implementation switch to play 2.2 forces the use of Future[SimpleResult] in authorizedAction.

Therefore code like

authorizedAction(authority) { Ok("success") }

breaks.

Plain play actions can be used this way. You can either write

Action { Ok("success") }

or if you need it asynchonously, you write

Action.async { Future.successful(Ok("success")) }

This change allows this for autorizedAction.

Furthermore, with this change, old code - that is already using non-asynchronous authorizedActions - is not breaking anymore.