Is there a way in Deadbolt to use Future[User] in MyDeadboltHandler's getSubject method without blocking?
Current method expects a request and returns an Option[Subject]
override def getSubject[A](request: Request[A]): Option[Subject] = {
currentUser //<-- currentUser is a Future[User]
....
}
I'll make this change for the next release of Deadbolt.
Update: Version 2.3.2 of Deadbolt now gives you... Scala: Future[Option[Subject]] Java: F.Promise
Additionally, this version is available via Maven Central so you don't need to specify the Objectify Repository resolver any more. Older versions still require the resolver.