3

I'd like to use the tolerantJson body parser within a Deadbolt action like this:

actionBuilders.PatternAction(value = permission.value,
  patternType = PatternType.EQUALITY).apply(parse.tolerantJson)

But that parses the body of the request first before performing the authentication checks... so if I have an unauthenticated user POST-ing a request with malformed json string as a body the response will be 400 instead of 401.

Any idea how to tie these two together so the authentication comes before the parsing of the request body?

deadbolt - 2.5.0, scala play - 2.5

Todor Kolev
  • 1,432
  • 1
  • 16
  • 33
  • did you figure it out? have the same issue – synthetic May 25 '17 at 00:30
  • @synthetic try using "Commented routes". The [Scala docs](https://deadbolt-scala.readme.io/v2.5.1/docs/commented-routes) are still in progress but check out the [Java ones](https://deadbolt-java.readme.io/docs/commented-routes) too. – Todor Kolev May 25 '17 at 09:35

0 Answers0