deadbolt-2-guide
deadbolt-2-guide copied to clipboard
Action composition example not working
I'm using Play 2.6 and Deadbolt2
I tried as per example:
def someFunctionA = deadbolt.SubjectPresent() { Action { Ok("Ok") } }
play.sbt.PlayExceptions$CompilationException: Compilation error[type mismatch; found : play.api.mvc.Action[play.api.mvc.AnyContent] required: play.api.mvc.BodyParser[?]]
Also tried:
def someFunctionA = deadbolt.SubjectPresent()() { Action { Ok("Ok") } }
play.sbt.PlayExceptions$CompilationException: Compilation error[type mismatch; found : play.api.mvc.Action[play.api.mvc.AnyContent] required: be.objectify.deadbolt.scala.AuthenticatedRequest[play.api.mvc.AnyContent] => scala.concurrent.Future[play.api.mvc.Result]]