I am trying to use the security helpers inside a controller as shown in the source code of Security.scala
My code looks like
import play.mvc.Security.Authenticated
Application extends Controller {
..... some other Actions
def isAuthenticated(f: => String => Request[AnyContent] => Result) = {
Authenticated { user =>
Action(request => f(user)(request))
}
}
}
However, I am getting the following compilation error
[info] Compiling 1 Scala source to /home/venki/play/lrs/target/scala-2.11/classes...
[error] /home/venki/play/lrs/app/controllers/Application.scala:119: object play.mvc.Security.Authenticated is not a value
[error] Authenticated { user =>
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
I can't understand the error. From the source code i can see that Security object contains two overloaded methods named Authenticated. I have exactly copy pasted the code given as example usage, still it does not work. Any help is very much appreciated