Deadbolt for Scala

The Deadbolt for Scala Developer Hub

Welcome to the Deadbolt for Scala developer hub. You'll find comprehensive guides and documentation to help you start working with Deadbolt for Scala as quickly as possible, as well as support if you get stuck. Let's jump right in!

This project is supported by Auth0.

If you want to easily add secure authentication and authorization to your Java or Scala projects, feel free to check out Auth0's Java SDK, Scala examples and free plan at

Get Started    
Ask A Question


Empty request body in tests

Posted by Ben Stephenson 2 months ago

I have a POST request that contains some data I need to inspect before deciding which deadbolt dynamic constraint to use, so I'm parsing the request body using Play's action builder Action.async(parse.json) and then calling one of two dynamic handlers based on the content.

Invoking the endpoint with curl works as expected, however in my integration tests the deadbolt actions fail with a 'Invalid Json: No content to map due to end-of-input' error. I've got a feeling that this is due to the controller stubbing in Play tests but is there anything in deadbolt that could effect the tests in this way?

Loading comments...