title: Play Framework: Dependency Inject Action Builder
body: <p>since Play Framework 2.4 there is the possibility to use dependency injection (with Guice).</p>
  
  <p>Before I used objects (for example <code>AuthenticationService</code>) in my ActionBuilders:</p>
  
  <pre><code>object AuthenticatedAction extends ActionBuilder[AuthenticatedRequest] {
    override def invokeBlock[A](request: Request[A], block: (AuthenticatedRequest[A]) =&gt; Future[Result]): Future[Result] = {
      ...
      AuthenticationService.authenticate (...)
      ...
    }
  }
  </code></pre>
  
  <p>Now <code>AuthenticationService</code> is not an object anymore, but a class. How can I still use the <code>AuthenticationService</code> in my <code>ActionBuilder</code>? </p>