value jwtSession is not a member of play.api.mvc.Request
See original GitHub issueHi there,
after installing play-jwt I randomly get errors like:
Error:(22, 13) value jwtSession is not a member of play.api.mvc.Request[A]
request.jwtSession.getAs[User]("user") match {
^
and I’ve to manually reload sbt dependencies. This is my build.sbt file
name := "Project"
version := "0.0.1"
inConfig(Compile)(mappings in packageBin <++= Defaults.sourceMappings)
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= {
val postgresV = "9.4.1207"
val nscalaTimeV = "2.6.0"
val playSlickV = "1.1.1"
val slickPgV = "0.10.2"
val slickJodaMapperVersion = "2.1.0"
Seq(
cache,
ws,
specs2 % Test,
"org.postgresql" % "postgresql" % postgresV,
"com.github.tminglei" %% "slick-pg" % slickPgV,
"com.github.tminglei" %% "slick-pg_play-json" % slickPgV,
"com.typesafe.play" %% "play-slick" % playSlickV,
"com.typesafe.play" %% "play-slick-evolutions" % playSlickV,
"com.github.nscala-time" %% "nscala-time" % nscalaTimeV,
"com.github.tototoshi" %% "slick-joda-mapper" % slickJodaMapperVersion,
"de.svenkubiak" % "jBCrypt" % "0.4.1",
"com.pauldijou" %% "jwt-play" % "0.5.1",
"com.amazonaws" % "aws-java-sdk" % "1.10.64"
)
}
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
// Newrelic configuration
enablePlugins(NewRelic)
newrelicVersion := "3.27.0"
newrelicAppName := "Project"
// Enable filters (to use CORS filter
libraryDependencies += filters
Everything seems correct, I’ve not idea on what could cause that.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
value jwtSession is not a member of play.api.mvc.Request #19
Hi there, after installing play-jwt I randomly get errors like: Error:(22, 13) value jwtSession is not a member of play.api.mvc.Request[A] ...
Read more >value withLang is not a member of play.api.mvc.Result
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >JWT Scala: Play
Provides an API similar to the Play Session but using JsValue rather than String ... use the default values (which are all empty)...
Read more >play.api.mvc.RequestHeader
Abstract Value Members. abstract def attrs: TypedMap. A map of typed attributes associated with the request. abstract def connection: RemoteConnection.
Read more >Play will mysteriously will not compile. Anything in it is not ...
JsObjectimport play.api.libs.jsonimport java.util. ... _import play.api.mvc. ... object Actor is not a member of package akka.io[error] import akka.io.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interestingly,
import pdi.jwt.JwtSession._
fixed the issue+1 Have the same issue in Intellij IDEA… The code compiles via command line by “sbt compile” but in IDE it throws compiling errors…
UPDATE: I fixed it by adding “JwtPlayImplicits” trait (https://github.com/pauldijou/jwt-scala/blob/master/play/src/main/scala/JwtPlayImplicits.scala) for actions and my project started to compile in IntelliJ IDEA also