title: Play 2.6 ActionBuilder
body: <p>I upgraded my Play application from 2.5 to 2.6 today and i got a problem with ActionBuilder. The docs state:</p>
  
  <blockquote>
    <p>The Scala ActionBuilder trait has been modified to specify the type of the body as a type parameter, and add an abstract parser member as the default body parsers. You will need to modify your ActionBuilders and pass the body parser directly.</p>
  </blockquote>
  
  <p><a href="https://www.playframework.com/documentation/2.6.x/Migration26#scala-actionbuilder-and-bodyparser-changes" rel="noreferrer">documentation</a></p>
  
  <p>Sadly I haven't found any example and i don't know how to fix that:</p>
  
  <pre><code>class AuthenticatedRequest[A](val token: ProfileTokenData, request: Request[A]) extends WrappedRequest[A](request)
  
  trait Secured {
  
    object SetExtractor {
      def unapplySeq[T](s: Set[T]): Option[Seq[T]] = Some(s.toSeq)
    }
  
    def Authenticated = new ActionBuilder[AuthenticatedRequest] with JWTTokenProcess {
      override def invokeBlock[A](request: Request[A], block: (AuthenticatedRequest[A]) =&gt; Future[Result]): Future[Result] = {
        request.jwtSession.claimData.asOpt[JWTToken] match {
          case Some(token) =&gt; block(new AuthenticatedRequest(ProfileTokenData(null, token.sub, AuthRole.None), request)).map(_.refreshJwtSession(request))
          case _ =&gt; Future.successful(Unauthorized)
        }
      }
    }
  
    def Registered = new ActionBuilder[AuthenticatedRequest] with JWTTokenProcess {
      override def invokeBlock[A](request: Request[A], block: (AuthenticatedRequest[A]) =&gt; Future[Result]): Future[Result] =
        this.processJWTToken(request, block, Seq(AuthRole.Admin, AuthRole.Customer, AuthRole.Registered))
    }
  
    def Customer = new ActionBuilder[AuthenticatedRequest] with JWTTokenProcess {
      override def invokeBlock[A](request: Request[A], block: (AuthenticatedRequest[A]) =&gt; Future[Result]): Future[Result] =
        this.processJWTToken(request, block, Seq(AuthRole.Admin, AuthRole.Customer))
    }
  
    def Admin = new ActionBuilder[AuthenticatedRequest] with JWTTokenProcess {
      override def invokeBlock[A](request: Request[A], block: (AuthenticatedRequest[A]) =&gt; Future[Result]): Future[Result] =
        this.processJWTToken(request, block, Seq(AuthRole.Admin))
    }
  
  }
  </code></pre>
  
  <p>Does anyone know whic BodyParser i have to pass as second argument?</p>