Guest User

Untitled

a guest
May 6th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. [error] a.a.ActorSystemImpl - Uncaught fatal error from thread [application-akka.actor.default-dispatcher-3] shutting down ActorSystem [application]
  2. java.lang.NoSuchMethodError: play.api.libs.functional.syntax.package$.functionalCanBuildApplicative(Lplay/api/libs/functional/Applicative;)Lplay/api/libs/functional/FunctionalCanBuild;
  3. at com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator$.<init>(CookieAuthenticator.scala:92)
  4. at com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator$.<clinit>(CookieAuthenticator.scala)
  5. at com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticatorService.init(CookieAuthenticator.scala:229)
  6. at com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticatorService.init(CookieAuthenticator.scala:148)
  7. at controllers.CredentialsAuthController$$anonfun$authenticate$1$$anonfun$apply$3$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$7.apply(CredentialsAuthController.scala:72)
  8. at controllers.CredentialsAuthController$$anonfun$authenticate$1$$anonfun$apply$3$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$7.apply(CredentialsAuthController.scala:70)
  9. at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
  10. at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
  11. at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
  12. at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
  13.  
  14. def authenticate = Action.async { implicit request =>
  15. SignInForm.form.bindFromRequest.fold(
  16. form => Future.successful(BadRequest(views.html.signIn(form))),
  17. data => {
  18. val credentials = Credentials(data.email, data.password)
  19. credentialsProvider.authenticate(credentials).flatMap { loginInfo =>
  20. val result = Redirect(routes.ApplicationController.index())
  21. userService.retrieve(loginInfo).flatMap {
  22. case Some(user) =>
  23. val c = configuration.underlying
  24. env.authenticatorService.create(loginInfo).map {
  25. case authenticator if data.rememberMe =>
  26. authenticator.copy(
  27. expirationDateTime = clock.now + c.as[FiniteDuration]("silhouette.authenticator.rememberMe.authenticatorExpiry"),
  28. idleTimeout = c.getAs[FiniteDuration]("silhouette.authenticator.rememberMe.authenticatorIdleTimeout"),
  29. cookieMaxAge = c.getAs[FiniteDuration]("silhouette.authenticator.rememberMe.cookieMaxAge")
  30. )
  31. case authenticator => authenticator
  32. }.flatMap { authenticator =>
  33. env.eventBus.publish(LoginEvent(user, request, request2Messages))
  34. env.authenticatorService.init(authenticator).flatMap { v =>
  35. env.authenticatorService.embed(v, result)
  36. }
  37. }
  38. case None => Future.failed(new IdentityNotFoundException("Couldn't find user"))
  39. }
  40. }.recover {
  41. case e: ProviderException =>
  42. Redirect(routes.ApplicationController.signIn()).flashing("error" -> Messages("invalid.credentials"))
  43. }
  44. }
  45. )
  46. }
  47.  
  48. env.authenticatorService.embed(v, result)
Add Comment
Please, Sign In to add comment