I'm working on a project to integrate play silhouette with reactivemongo
When I compile my project shows me an error like this:
[error] /reactivemongo-silhouette-rest/app/models/daos/PasswordInfoDAO.scala:83: value getAsTry is not a member of com.mohiva.play.silhouette.api.util.PasswordInfo [error] Future(Some(fullDoc.getAsTryBSONString.get))
mi method is this:
def find(loginInfo: LoginInfo) = {
implicit val userFormat = Macros.handler[PasswordInfo]
val collection = db[BSONCollection]("PasswordInfo")
val query = BSONDocument(
"loginInfo" -> BSONDocument(
"loginInfo" -> loginInfo.providerID,
"loginInfo" -> loginInfo.providerKey
)
)
val passwordInfo: Future[Option[PasswordInfo]] = collection.find( query ).one[PasswordInfo]
passwordInfo.flatMap {
case None =>
Future.successful(Option.empty[PasswordInfo])
case Some(fullDoc) =>
Future(Some(fullDoc.getAsTry[PasswordInfo]("authInfo").get))
}
//Future.successful(data.get(loginInfo))
}
The complete versiĆ³n is here:
And the PasswordInfo is here:
Can someone tell me what am doing wrong or what am i missing?
The repository on github is this: https://github.com/hectorgool/reactivemongo-silhouette-rest