Discussions

Ask a Question
ANSWERED

What would be the best way to handle JWT authenticator idle expiration?

I would like to handle idle expiration by updating the tokens with every request, so essentially touch the validated token and send it back with the result. How can I avoid having to parse the token twice, once in the DeadboltHandler to authorize the request, and the second time in the action body to send the updated token back?
ANSWERED

Request body is of type Nothing

Hi! Usually I can use request.body.asJson to get the data passed to my action. But when I'm using Deadbolt I get a "be.objectify.deadbolt.scala.AuthenticatedRequest" where body is "Nothing" and "AnyContent" when not using Deadbolt. I guess that I'm supposed to be able to reach the body even if I'm using Deadbolt, right? Snippet of the code: class Application @Inject()(deadbolt: DeadboltActions) extends Controller { def search = deadbolt.SubjectPresent()() { authRequest => Future { var currentUser: User = authRequest.subject.get.asInstanceOf[User] // authRequest.body.asJson Ok("Hello " + currentUser.name) } } }
ANSWERED

How deadbolt 2.4.4 integrate with Play-Framework 2.3.10

Hello Team, I am trying to integrate Deadbolt with my application, but my application is build upon Play-Framework 2.3.10 and deadbolt old versions are now deprecated. It is difficult for us to migrate our project to new version. How can we integrate, deadbolt with our play-framework version.