Skip to content

Instantly share code, notes, and snippets.

@jmkoni
Created May 2, 2018 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmkoni/017847a7947366f7ee415777323a1e66 to your computer and use it in GitHub Desktop.
Save jmkoni/017847a7947366f7ee415777323a1e66 to your computer and use it in GitHub Desktop.
import org.scalatra.ScalatraServlet
class MyServlet extends ScalatraServlet {
get("/") {
authenticateCookie(request) match {
case Some(_) => {
views.html.hello()
}
case None => {
views.html.error("Cookie is invalid.")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment